]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Don't add subdirectory watches if the platform's notifier doesn't require them. refs...
authorDaira Hopwood <daira@jacaranda.org>
Fri, 30 Oct 2015 02:04:30 +0000 (02:04 +0000)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 25 Jan 2016 15:52:13 +0000 (15:52 +0000)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/magic_folder.py
src/allmydata/windows/inotify.py

index b216294b51edd148ecec50cb43daa88587817c03..62daae8c825e3e2190e409fb9e284e9879a92333 100644 (file)
@@ -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)
index bcbc241f8537b3797c339f152154049d0d919c06..4e7bc90492c9a263f5e9008cb0813816e762db96 100644 (file)
@@ -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