summaryrefslogtreecommitdiff
path: root/Userland/Applications/FileManager/main.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-03-12 12:44:37 +0000
committerAndreas Kling <kling@serenityos.org>2022-03-13 22:38:48 +0100
commitdc5a318aa9fd69e365836c3b41f66645dc839a77 (patch)
treecfa7da5bf3fbfa9bcc7ad4ecf7fd1a3111cbf4cb /Userland/Applications/FileManager/main.cpp
parent6a23dfbc92ed4dbadacdee6b28a62d13571a3117 (diff)
downloadserenity-dc5a318aa9fd69e365836c3b41f66645dc839a77.zip
FileManager: Use TRY in run_file_operation()
The exception is `execvp()` since that has no Core::System wrapper yet.
Diffstat (limited to 'Userland/Applications/FileManager/main.cpp')
-rw-r--r--Userland/Applications/FileManager/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp
index 5dc9a53bb5..e4b6898712 100644
--- a/Userland/Applications/FileManager/main.cpp
+++ b/Userland/Applications/FileManager/main.cpp
@@ -176,8 +176,10 @@ void do_paste(String const& target_directory, GUI::Window* window)
source_paths.append(url.path());
}
- if (!source_paths.is_empty())
- run_file_operation(file_operation, source_paths, target_directory, window);
+ if (!source_paths.is_empty()) {
+ if (auto result = run_file_operation(file_operation, source_paths, target_directory, window); result.is_error())
+ dbgln("Failed to paste files: {}", result.error());
+ }
}
void do_create_link(Vector<String> const& selected_file_paths, GUI::Window* window)