From 548c2f667c270b0c7a2502078b5b0ec330334ed0 Mon Sep 17 00:00:00 2001
From: Daira Hopwood <daira@jacaranda.org>
Date: Wed, 23 Sep 2015 14:49:31 +0100
Subject: [PATCH] Fix an oversight when joining paths.

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

diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py
index 17be7570..10b56d8a 100644
--- a/src/allmydata/frontends/magic_folder.py
+++ b/src/allmydata/frontends/magic_folder.py
@@ -247,7 +247,8 @@ class Uploader(QueueMixin):
         d = defer.succeed(None)
         for child in children:
             assert isinstance(child, unicode), child
-            d.addCallback(lambda ign, child=child: "%s/%s" % (reldir_u, child))
+            d.addCallback(lambda ign, child=child:
+                          ("%s/%s" % (reldir_u, child) if reldir_u else child))
             def _add_pending(relpath_u):
                 self._pending.add(relpath_u)
                 return relpath_u
-- 
2.45.2