diff --git a/src/ytdl_sub/utils/file_handler.py b/src/ytdl_sub/utils/file_handler.py index 6a3dc6c9..4cbf41f6 100644 --- a/src/ytdl_sub/utils/file_handler.py +++ b/src/ytdl_sub/utils/file_handler.py @@ -365,11 +365,8 @@ class FileHandler: # Invalid cross-device link # Can happen from using os.rename under the hood, which requires the two file on the # same filesystem. Work around it by copying and deleting the file - if os_error_exc.errno == 18: - cls.copy(src_file_path, dst_file_path) - cls.delete(src_file_path) - else: - raise + cls.copy(src_file_path, dst_file_path) + cls.delete(src_file_path) @classmethod def delete(cls, file_path: Union[str, Path]):