From 2f9c29de3b20709287ace394d74c125f6bf1683d Mon Sep 17 00:00:00 2001 From: Gaspar Capello Date: Wed, 30 Aug 2023 16:46:23 -0300 Subject: [PATCH] Fix in Save dialogs, current directory is not last visited (fix #3996) This regression was added in 1.3rc5. Every time you wanted to save a new sprite the dialog would start at the root path instead of the last used directory location. --- src/app/ui/file_selector.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/ui/file_selector.cpp b/src/app/ui/file_selector.cpp index b7bd67cbb79..a30842b78dd 100644 --- a/src/app/ui/file_selector.cpp +++ b/src/app/ui/file_selector.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2019-2022 Igara Studio S.A. +// Copyright (C) 2019-2023 Igara Studio S.A. // Copyright (C) 2001-2018 David Capello // // This program is distributed under the terms of @@ -412,8 +412,8 @@ bool FileSelector::show( // We have to find where the user should begin to browse files std::string start_folder_path; - if (initialPath.empty()) { - start_folder_path = get_initial_path_to_select_filename(initialPath); + if (base::get_file_path(initialPath).empty()) { + start_folder_path = get_current_dir_for_file_selector(); } else { start_folder_path = base::get_file_path(initialPath);