fix: allow moving files across devices
This commit is contained in:
@@ -2,6 +2,7 @@ import fnmatch
|
||||
import io
|
||||
import os
|
||||
import pathlib
|
||||
import shutil
|
||||
|
||||
import requests
|
||||
import send2trash
|
||||
@@ -120,7 +121,7 @@ def move_file_to_move_folder(file_path: pathlib.Path) -> None:
|
||||
while destination_path.exists():
|
||||
destination_path = move_dir_path / f"{name}_{counter}{ext}"
|
||||
counter += 1
|
||||
_ = file_path.rename(destination_path)
|
||||
_ = shutil.move(file_path, destination_path)
|
||||
|
||||
def trash_file(file_path: pathlib.Path) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user