File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1151,6 +1151,8 @@ def rename_files(self):
1151
1151
other_path .replace (new_file_path )
1152
1152
1153
1153
for fuzzy_path in fuzzy_paths :
1154
+ if not fuzzy_path .exists ():
1155
+ continue
1154
1156
(fuzzy_prefix_path , fuzzy_stem ) = directory_and_stem (fuzzy_path , True )
1155
1157
old_file_str = fuzzy_path .name
1156
1158
new_file_str = new_stem + old_file_str [len (fuzzy_stem ):]
@@ -1159,7 +1161,7 @@ def rename_files(self):
1159
1161
continue
1160
1162
log .debug (f'Considering rename for: { self !s} \n \t { fuzzy_path !s} \n \t { new_file_path !s} ' )
1161
1163
# it quite possibly was renamed already
1162
- if fuzzy_path . exists () and not new_file_path .exists ():
1164
+ if not ( new_video_path . samefile ( fuzzy_path ) or new_file_path .exists () ):
1163
1165
log .debug (f'{ self !s} : { fuzzy_path !s} => { new_file_path !s} ' )
1164
1166
fuzzy_path .rename (new_file_path )
1165
1167
You can’t perform that action at this time.
0 commit comments