summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-07 01:42:54 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 00:35:27 +0100
commit4a2b718ba2f857a1ca43e58cc0c68dad7b88e9ae (patch)
tree4669f68db76004aae779c5474b468e0764df2dab /Userland/Utilities
parentc7e62d448ca45c25841f57d1dcb9056b9d73da37 (diff)
downloadserenity-4a2b718ba2f857a1ca43e58cc0c68dad7b88e9ae.zip
LibCore: Use ErrorOr<T> for Core::File::copy_file()
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/cp.cpp2
-rw-r--r--Userland/Utilities/mv.cpp2
-rw-r--r--Userland/Utilities/usermod.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Utilities/cp.cpp b/Userland/Utilities/cp.cpp
index b27b033476..b5b1cfa668 100644
--- a/Userland/Utilities/cp.cpp
+++ b/Userland/Utilities/cp.cpp
@@ -61,7 +61,7 @@ int main(int argc, char** argv)
if (result.error().tried_recursing)
warnln("cp: -R not specified; omitting directory '{}'", source);
else
- warnln("cp: unable to copy '{}' to '{}': {}", source, destination_path, result.error().error_code);
+ warnln("cp: unable to copy '{}' to '{}': {}", source, destination_path, static_cast<Error const&>(result.error()));
return 1;
}
diff --git a/Userland/Utilities/mv.cpp b/Userland/Utilities/mv.cpp
index 1e917f69b7..29f607d2be 100644
--- a/Userland/Utilities/mv.cpp
+++ b/Userland/Utilities/mv.cpp
@@ -74,7 +74,7 @@ int main(int argc, char** argv)
Core::File::AddDuplicateFileMarker::No);
if (result.is_error()) {
- warnln("mv: could not move '{}': {}", old_path, result.error().error_code);
+ warnln("mv: could not move '{}': {}", old_path, static_cast<Error const&>(result.error()));
return 1;
}
rc = unlink(old_path);
diff --git a/Userland/Utilities/usermod.cpp b/Userland/Utilities/usermod.cpp
index 7b70659517..53e425b893 100644
--- a/Userland/Utilities/usermod.cpp
+++ b/Userland/Utilities/usermod.cpp
@@ -125,7 +125,7 @@ int main(int argc, char** argv)
Core::File::AddDuplicateFileMarker::No);
if (result.is_error()) {
- warnln("usermod: could not move directory {} : {}", target_account.home_directory().characters(), result.error().error_code);
+ warnln("usermod: could not move directory {} : {}", target_account.home_directory().characters(), static_cast<Error const&>(result.error()));
return 1;
}
rc = unlink(target_account.home_directory().characters());