mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-24 02:51:18 +00:00
For all downloaded files ensure parent dir exists
This commit is contained in:
parent
27fb403dad
commit
531747303d
@ -580,6 +580,11 @@ class Downloader(QueueMixin):
|
|||||||
if now is None:
|
if now is None:
|
||||||
now = time.time()
|
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)
|
fileutil.write(replacement_path_u, file_contents)
|
||||||
os.utime(replacement_path_u, (now, now - cls.FUDGE_SECONDS))
|
os.utime(replacement_path_u, (now, now - cls.FUDGE_SECONDS))
|
||||||
if is_conflict:
|
if is_conflict:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user