From 2acceb6ca7df114b71428d3859615d99d420c53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D1=80=D0=B5=D0=B4=D1=80=D0=B0=D0=B3=20=D0=9D=D0=B8?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=B8=D1=9B?= Date: Thu, 27 Jun 2024 21:59:30 +0200 Subject: [PATCH] save some lines --- plugin/rename_file.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugin/rename_file.py b/plugin/rename_file.py index 671b9ccc0..b829040ad 100644 --- a/plugin/rename_file.py +++ b/plugin/rename_file.py @@ -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: