]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Teach uploader to only unicode instead of utf-8
authorDavid Stainton <dstainton415@gmail.com>
Tue, 28 Apr 2015 08:32:34 +0000 (09:32 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 28 Apr 2015 18:50:15 +0000 (19:50 +0100)
src/allmydata/frontends/drop_upload.py

index f5a1bcbbee0bf2ac3450c1910a60a3d12dbaa222..93a2d79f57898fa1a445c73d70af9e24fe35a728 100644 (file)
@@ -103,14 +103,14 @@ class DropUploader(service.MultiService):
             if islink:
                 self.warn("WARNING: cannot backup symlink %s" % quote_local_unicode_path(childpath))
             elif isdir:
-                must_upload = self._check_db_file(childpath.decode('UTF-8'))
+                must_upload = self._check_db_file(childpath)
                 if must_upload:
                     self._append_to_deque(childpath)
 
                 # recurse on the child directory
                 self._scan(childpath)
             elif isfile:
-                must_upload = self._check_db_file(childpath.decode('UTF-8'))
+                must_upload = self._check_db_file(childpath)
                 if must_upload:
                     self._append_to_deque(childpath)
             else:
@@ -212,8 +212,7 @@ class DropUploader(service.MultiService):
                     size = s[stat.ST_SIZE]
                     ctime = s[stat.ST_CTIME]
                     mtime = s[stat.ST_MTIME]
-                    self._db.did_upload_file(filecap, path.decode('UTF-8'),
-                                             mtime, ctime, size)
+                    self._db.did_upload_file(filecap, path, mtime, ctime, size)
                 d.addCallback(add_db_entry)
                 self._stats_provider.count('drop_upload.files_uploaded', 1)
                 return None