From 9bc2e9ef648a13c09a6edf3c6553803d1b99d5ee Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 17 Sep 2015 16:13:36 +0100 Subject: [PATCH] Fix relative path calculation WIP. Signed-off-by: Daira Hopwood --- src/allmydata/frontends/magic_folder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index bb7a00de..1b30dd7f 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -121,7 +121,10 @@ class QueueMixin(HookMixin): return unicode_from_filepath(self._local_filepath.preauthChild(relpath_u)) def _get_relpath(self, filepath): - return u"/".join(filepath.segmentsFrom(self._local_filepath)) + print "_get_relpath(%r)" % (filepath,) + segments = filepath.asTextMode().segmentsFrom(self._local_filepath.asTextMode()) + print "segments = %r" % (segments,) + return u"/".join(segments) def _count(self, counter_name, delta=1): self._client.stats_provider.count('magic_folder.%s.%s' % (self._name, counter_name), delta) -- 2.45.2