diff --git a/archreposrv b/archreposrv index deeb3cd..2e85f96 100755 --- a/archreposrv +++ b/archreposrv @@ -225,8 +225,13 @@ class EventHandler(pyinotify.ProcessEvent): newd = os.path.join(base, newarch) newpath = os.path.join(newd, file) if action == 'add': - os.symlink(os.path.join('..', arch, file), newpath) - self._real_dispatch(newd, ActionInfo(newpath, action)) + try: + os.symlink(os.path.join('..', arch, file), newpath) + except FileExistsError: + # already there? do nothing then. + else: + # XXX: this should be removed as soon as symlinks are supported + self._real_dispatch(newd, ActionInfo(newpath, action)) else: try: os.unlink(newpath)