From: Daira Hopwood Date: Tue, 11 Aug 2015 14:19:05 +0000 (+0100) Subject: Processing symlinks and special files should not be an error. X-Git-Url: https://git.rkrishnan.org/pf/$rel_link?a=commitdiff_plain;h=8eb81b84f206eb5305e35df31aa244d36f8cd407;p=tahoe-lafs%2Ftahoe-lafs.git Processing symlinks and special files should not be an error. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 52790bc4..1164aa5d 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -334,7 +334,8 @@ class Uploader(QueueMixin): d2.addCallback(lambda x: Exception("file does not exist")) return d2 elif os.path.islink(path_u): - raise Exception("symlink not being processed") + self.warn("WARNING: cannot upload symlink %s" % quote_local_unicode_path(path_u)) + return None elif os.path.isdir(path_u): self._notifier.watch(to_filepath(path_u), mask=self.mask, callbacks=[self._notify], recursive=True) uploadable = Data("", self._client.convergence) @@ -369,7 +370,8 @@ class Uploader(QueueMixin): d2.addCallback(add_db_entry) return d2 else: - raise Exception("non-directory/non-regular file not being processed") + self.warn("WARNING: cannot process special file %s" % quote_local_unicode_path(path_u)) + return None d.addCallback(_maybe_upload)