From: Ramakrishnan Muthukrishnan Date: Mon, 31 Aug 2015 08:23:48 +0000 (+0530) Subject: _process(): pass absolute path to the _write_download_file() X-Git-Url: https://git.rkrishnan.org/pf/content/en/seg/statistics?a=commitdiff_plain;h=9bf5f5c312b6dca2ad63030319c06e8986fc9411;p=tahoe-lafs%2Ftahoe-lafs.git _process(): pass absolute path to the _write_download_file() --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index cf8eaa68..bf3f1a1f 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -12,7 +12,7 @@ from twisted.application import service from allmydata.util import fileutil from allmydata.interfaces import IDirectoryNode from allmydata.util import log -from allmydata.util.fileutil import precondition_abspath, get_pathinfo +from allmydata.util.fileutil import precondition_abspath, get_pathinfo, abspath_expanduser_unicode from allmydata.util.assertutil import precondition from allmydata.util.deferredutil import HookMixin from allmydata.util.encodingutil import listdir_unicode, to_filepath, \ @@ -526,7 +526,8 @@ class Downloader(QueueMixin): mtime = s[stat.ST_MTIME] self._db.did_upload_file(filecap, name, metadata['version'], mtime, ctime, size) d2 = defer.succeed(res) - d2.addCallback(lambda result: self._write_downloaded_file(name, result)) + absname = abspath_expanduser_unicode(name) + d2.addCallback(lambda result: self._write_downloaded_file(absname, result)) d2.addCallback(do_update_db) self._count('objects_downloaded') return d2