From: David Stainton Date: Tue, 28 Apr 2015 08:32:34 +0000 (+0100) Subject: Teach uploader to only unicode instead of utf-8 X-Git-Url: https://git.rkrishnan.org/status?a=commitdiff_plain;h=b648b0656961c51451dab32a19c5076a30c50e2f;p=tahoe-lafs%2Ftahoe-lafs.git Teach uploader to only unicode instead of utf-8 --- diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py index eb60c1c6..44a699ef 100644 --- a/src/allmydata/frontends/drop_upload.py +++ b/src/allmydata/frontends/drop_upload.py @@ -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: @@ -207,8 +207,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