mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
use Path.rename to overwrite
This commit is contained in:
parent
a8b0c783c9
commit
5901d7484c
@ -85,7 +85,8 @@ def move_files_in(src: Path, dst: Path):
|
|||||||
for file in src.glob('*'):
|
for file in src.glob('*'):
|
||||||
empty = False
|
empty = False
|
||||||
print(f"moving {file} to {dst}")
|
print(f"moving {file} to {dst}")
|
||||||
shutil.move(str(file), str(dst))
|
# shutil.move(str(file), str(dst))
|
||||||
|
file.rename(dst / file.name) # Overwrite files
|
||||||
if empty:
|
if empty:
|
||||||
print(f"{src} is empty")
|
print(f"{src} is empty")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user