We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 763efc2 commit e490452Copy full SHA for e490452
1 file changed
fs/move.py
@@ -77,10 +77,9 @@ def move_file(
77
common = commonpath([src_syspath, dst_syspath])
78
rel_src = frombase(common, src_syspath)
79
rel_dst = frombase(common, dst_syspath)
80
- with _src_fs.lock(), _dst_fs.lock(), open_fs(
81
- common, writeable=True
82
- ) as base:
83
- base.move(rel_src, rel_dst, preserve_time=preserve_time)
+ with _src_fs.lock(), _dst_fs.lock():
+ with open_fs(common, writeable=True) as base:
+ base.move(rel_src, rel_dst, preserve_time=preserve_time)
84
return # optimization worked, exit early
85
except ValueError:
86
# This is raised if we cannot find a common base folder.
0 commit comments