]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Processing symlinks and special files should not be an error.
authorDaira Hopwood <daira@jacaranda.org>
Tue, 11 Aug 2015 14:19:05 +0000 (15:19 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 1 Oct 2015 00:19:46 +0000 (01:19 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/frontends/magic_folder.py

index 52790bc4c4142d2f13504dffa0aaa25341ea3756..1164aa5d64455010ae605b980b1183b18130ed55 100644 (file)
@@ -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)