Skip to content

Commit

Permalink
save some lines
Browse files Browse the repository at this point in the history
  • Loading branch information
predragnikolic committed Jun 27, 2024
1 parent a52b5c4 commit 2acceb6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions plugin/rename_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ def rename_path(self, old_path: str, new_path: str) -> None:
if isdir:
for v in self.window.views():
file_name = v.file_name()
if not file_name:
continue
if file_name.startswith(old_path):
if file_name and file_name.startswith(old_path):
v.retarget(file_name.replace(old_path, new_path))
if os.path.isfile(new_path):
def restore_regions(v: sublime.View | None) -> None:
Expand Down

0 comments on commit 2acceb6

Please sign in to comment.