Don't add subdirectory watches if the platform's notifier doesn't require them. refs #2559
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
parent
6bb0963197
commit
ea14b1bebe
|
@ -351,7 +351,9 @@ class Uploader(QueueMixin):
|
||||||
self.warn("WARNING: cannot upload symlink %s" % quote_filepath(fp))
|
self.warn("WARNING: cannot upload symlink %s" % quote_filepath(fp))
|
||||||
return None
|
return None
|
||||||
elif pathinfo.isdir:
|
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)
|
uploadable = Data("", self._client.convergence)
|
||||||
encoded_path_u += magicpath.path2magic(u"/")
|
encoded_path_u += magicpath.path2magic(u"/")
|
||||||
upload_d = self._upload_dirnode.add_file(encoded_path_u, uploadable, metadata={"version":0}, overwrite=True)
|
upload_d = self._upload_dirnode.add_file(encoded_path_u, uploadable, metadata={"version":0}, overwrite=True)
|
||||||
|
|
|
@ -201,6 +201,7 @@ class INotify(PollMixin):
|
||||||
self._path = None
|
self._path = None
|
||||||
self._pending = set()
|
self._pending = set()
|
||||||
self._pending_delay = 1.0
|
self._pending_delay = 1.0
|
||||||
|
self.recursive_includes_new_subdirectories = True
|
||||||
|
|
||||||
def set_pending_delay(self, delay):
|
def set_pending_delay(self, delay):
|
||||||
self._pending_delay = delay
|
self._pending_delay = delay
|
||||||
|
|
Loading…
Reference in New Issue