mirror of
https://github.com/lilydjwg/archrepo2.git
synced 2025-03-10 12:02:43 +00:00
fix: use absolute paths in self.files
relative paths are only used in database
This commit is contained in:
parent
53c8f08dc8
commit
6b38fdf608
1 changed files with 2 additions and 1 deletions
|
@ -261,7 +261,7 @@ class EventHandler(pyinotify.ProcessEvent):
|
|||
for f in os.listdir(d):
|
||||
p = os.path.join(d, f)
|
||||
if os.path.exists(p): # filter broken symlinks
|
||||
files.add(relpath(p, start=self._db_dir))
|
||||
files.add(p)
|
||||
wm.add_watch(d, pyinotify.ALL_EVENTS)
|
||||
self.repomans[d] = RepoMan(config, d, self._ioloop)
|
||||
self.name = self.repomans[d].name
|
||||
|
@ -273,6 +273,7 @@ class EventHandler(pyinotify.ProcessEvent):
|
|||
def _initial_update(self, files):
|
||||
oldfiles = {f[0] for f in self._db.execute('select filename from pkginfo where pkgrepo = ?', (self.name,))}
|
||||
oldfiles.update(f[0] for f in self._db.execute('select filename from sigfiles where pkgrepo = ?', (self.name,)))
|
||||
oldfiles = {os.path.join(self._db_dir, f) for f in oldfiles}
|
||||
|
||||
for f in sorted(filterfalse(filterPkg, files - oldfiles), key=pkgsortkey):
|
||||
self.dispatch(f, 'add')
|
||||
|
|
Loading…
Add table
Reference in a new issue