mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 13:33:09 +00:00
For all downloaded files ensure parent dir exists
This commit is contained in:
parent
c2d672e0b6
commit
f8bb229ab7
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user