mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-19 11:42:43 +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('*'):
|
||||
empty = False
|
||||
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:
|
||||
print(f"{src} is empty")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user