projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fbb346
)
For all downloaded files ensure parent dir exists
author
David Stainton
<dstainton415@gmail.com>
Mon, 5 Oct 2015 10:59:58 +0000
(12:59 +0200)
committer
Daira Hopwood
<daira@jacaranda.org>
Mon, 25 Jan 2016 15:44:20 +0000
(15:44 +0000)
src/allmydata/frontends/magic_folder.py
patch
|
blob
|
history
diff --git
a/src/allmydata/frontends/magic_folder.py
b/src/allmydata/frontends/magic_folder.py
index b6a9476f3627e8db623086656a8d792b1db3c57a..e32459c105977c784e491f9603d4c4bec8a6865a 100644
(file)
--- a/
src/allmydata/frontends/magic_folder.py
+++ b/
src/allmydata/frontends/magic_folder.py
@@
-580,6
+580,11
@@
class Downloader(QueueMixin):
if now is None:
now = time.time()
+ # ensure parent directory exists
+ head, tail = os.path.split(abspath_u)
+ mode = 0777 # XXX
+ fileutil.make_dirs(head, mode)
+
fileutil.write(replacement_path_u, file_contents)
os.utime(replacement_path_u, (now, now - cls.FUDGE_SECONDS))
if is_conflict: