mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-27 06:20:25 +00:00
Use os.path.dirname instead of split and rename var to initial_path_u
This commit is contained in:
parent
cd390b90e4
commit
2963e9e50c
@ -593,8 +593,8 @@ class WriteFileMixin(object):
|
||||
if now is None:
|
||||
now = time.time()
|
||||
|
||||
initial, last = os.path.split(abspath_u)
|
||||
fileutil.make_dirs_with_absolute_mode(local_path_u, initial, (~ self._umask) & 0777)
|
||||
initial_path_u = os.path.dirname(abspath_u)
|
||||
fileutil.make_dirs_with_absolute_mode(local_path_u, initial_path_u, (~ self._umask) & 0777)
|
||||
fileutil.write(replacement_path_u, file_contents)
|
||||
os.chmod(replacement_path_u, (~ self._umask) & 0777)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user