From c4e96011b9d150636538e3f253e185a70d6b2262 Mon Sep 17 00:00:00 2001
From: Daira Hopwood <daira@jacaranda.org>
Date: Tue, 11 Aug 2015 15:19:05 +0100
Subject: [PATCH] Processing symlinks and special files should not be an error.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
---
 src/allmydata/frontends/magic_folder.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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)
 
-- 
2.45.2