1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:08:12 +00:00

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.
This commit is contained in:
kleines Filmröllchen 2022-04-10 20:51:01 +02:00 committed by Andreas Kling
parent 0fd09b2381
commit 5319e3a03f
7 changed files with 14 additions and 48 deletions

View file

@ -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;
}