From 2e0d249ffb5a99d18a6cf58118d15d8cfe3c6776 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