Skip to content

Commit e490452

Browse files
committed
formatting
1 parent 763efc2 commit e490452

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

fs/move.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,9 @@ def move_file(
7777
common = commonpath([src_syspath, dst_syspath])
7878
rel_src = frombase(common, src_syspath)
7979
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)
80+
with _src_fs.lock(), _dst_fs.lock():
81+
with open_fs(common, writeable=True) as base:
82+
base.move(rel_src, rel_dst, preserve_time=preserve_time)
8483
return # optimization worked, exit early
8584
except ValueError:
8685
# This is raised if we cannot find a common base folder.

0 commit comments

Comments
 (0)