mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
Everywhere: Use LibFileSystem
where trivial
This commit is contained in:
parent
edab0cbf41
commit
1d24f394c6
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/cammo1123
Commit: 1d24f394c6
Pull-request: https://github.com/SerenityOS/serenity/pull/17789
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/caoimhebyrne
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/pascalpuffke
Reviewed-by: https://github.com/timschumi ✅
115 changed files with 275 additions and 228 deletions
|
@ -15,7 +15,7 @@
|
|||
#include <Applications/ThemeEditor/MetricPropertyGML.h>
|
||||
#include <Applications/ThemeEditor/PathPropertyGML.h>
|
||||
#include <Applications/ThemeEditor/ThemeEditorGML.h>
|
||||
#include <LibCore/DeprecatedFile.h>
|
||||
#include <LibFileSystem/FileSystem.h>
|
||||
#include <LibFileSystemAccessClient/Client.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
|
@ -591,8 +591,8 @@ void MainWidget::show_path_picker_dialog(StringView property_display_name, GUI::
|
|||
bool open_folder = path_picker_target == PathPickerTarget::Folder;
|
||||
auto window_title = DeprecatedString::formatted(open_folder ? "Select {} folder"sv : "Select {} file"sv, property_display_name);
|
||||
auto target_path = path_input.text();
|
||||
if (Core::DeprecatedFile::exists(target_path)) {
|
||||
if (!Core::DeprecatedFile::is_directory(target_path))
|
||||
if (FileSystem::exists(target_path)) {
|
||||
if (!FileSystem::is_directory(target_path))
|
||||
target_path = LexicalPath::dirname(target_path);
|
||||
} else {
|
||||
target_path = "/res/icons";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue