mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibCore: Use ErrorOr<T> for Core::File::copy_file()
This commit is contained in:
@@ -72,7 +72,7 @@ Result<void, String> ProjectTemplate::create_project(const String& name, const S
|
||||
auto result = Core::File::copy_file_or_directory(path, content_path());
|
||||
dbgln("Copying {} -> {}", content_path(), path);
|
||||
if (result.is_error())
|
||||
return String::formatted("Failed to copy template contents. Error code: {}", result.error().error_code);
|
||||
return String::formatted("Failed to copy template contents. Error code: {}", static_cast<Error const&>(result.error()));
|
||||
} else {
|
||||
dbgln("No template content directory found for '{}', creating an empty directory for the project.", m_id);
|
||||
int rc;
|
||||
|
||||
Reference in New Issue
Block a user