mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 15:28:11 +00:00
LibCore: Use ErrorOr<T> for Core::File::copy_file()
This commit is contained in:
parent
c7e62d448c
commit
4a2b718ba2
8 changed files with 37 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue