diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index b216294b5..62daae8c8 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -351,7 +351,9 @@ class Uploader(QueueMixin): self.warn("WARNING: cannot upload symlink %s" % quote_filepath(fp)) return None elif pathinfo.isdir: - self._notifier.watch(fp, mask=self.mask, callbacks=[self._notify], recursive=True) + if not getattr(self._notifier, 'recursive_includes_new_subdirectories', False): + self._notifier.watch(fp, mask=self.mask, callbacks=[self._notify], recursive=True) + uploadable = Data("", self._client.convergence) encoded_path_u += magicpath.path2magic(u"/") upload_d = self._upload_dirnode.add_file(encoded_path_u, uploadable, metadata={"version":0}, overwrite=True) diff --git a/src/allmydata/windows/inotify.py b/src/allmydata/windows/inotify.py index bcbc241f8..4e7bc9049 100644 --- a/src/allmydata/windows/inotify.py +++ b/src/allmydata/windows/inotify.py @@ -201,6 +201,7 @@ class INotify(PollMixin): self._path = None self._pending = set() self._pending_delay = 1.0 + self.recursive_includes_new_subdirectories = True def set_pending_delay(self, delay): self._pending_delay = delay