From 2bd4a641de58acc10dc715944f8c137cbfb5ef4b Mon Sep 17 00:00:00 2001 From: herr kaste Date: Fri, 4 Oct 2024 21:28:42 +0200 Subject: [PATCH] Do not use raw `project_data()` to determine "folders" In fact, `window.folders()` should have the same content as the `project_data` (if a project is even loaded) *but* project data can point to relative folders, e.g. `path = "."`, and in that case we're somewhat struck but Sublime translates that in `folders()` for us. --- dired.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dired.py b/dired.py index d12ca3d..2d20ecc 100644 --- a/dired.py +++ b/dired.py @@ -127,14 +127,7 @@ def _determine_path(self): return os.path.split(path) # Use the first project folder if there is one. - data = self.window.project_data() if ST3 else None - if data and 'folders' in data: - folders = data['folders'] - if folders: - return (folders[0]['path'], '') - - # Use window folder if possible - if len(folders) > 0: + if folders: return (folders[0], '') # Use the user's home directory.