diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-04-10 20:51:01 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-11 00:08:48 +0200 |
commit | 5319e3a03f7526ae62926897d023dd708c2bbf85 (patch) | |
tree | 5ce00f4e482fa3ca339022b79514dcbb68448b80 /Userland/DevTools | |
parent | 0fd09b2381e7d01eeb80cf811415f54174b03b56 (diff) | |
download | serenity-5319e3a03f7526ae62926897d023dd708c2bbf85.zip |
LibCore+Userland: Remove File::ensure_parent_directories
We have a much safer and more powerful alternative now, so let's move
the few users over.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r-- | Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp index e33d7ba9fe..2f4a4358b6 100644 --- a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp +++ b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp @@ -12,6 +12,7 @@ #include <AK/LexicalPath.h> #include <AK/String.h> +#include <LibCore/Directory.h> #include <LibCore/File.h> #include <LibGUI/BoxLayout.h> #include <LibGUI/Button.h> @@ -200,8 +201,8 @@ void NewProjectDialog::do_create_project() if (result != GUI::MessageBox::ExecResult::ExecYes) return; - auto created = Core::File::ensure_parent_directories(maybe_project_full_path.value()); - if (!created) { + auto created = Core::Directory::create(maybe_project_full_path.value(), Core::Directory::CreateDirectories::Yes); + if (!created.is_error()) { GUI::MessageBox::show_error(this, String::formatted("Could not create directory {}", create_in)); return; } |