diff --git a/Userland/Services/FileOperation/main.cpp b/Userland/Services/FileOperation/main.cpp index 96ec507151..14bbab1bd5 100644 --- a/Userland/Services/FileOperation/main.cpp +++ b/Userland/Services/FileOperation/main.cpp @@ -76,7 +76,7 @@ static void report_warning(String message) static bool collect_copy_work_items(String const& source, String const& destination, Vector& items) { struct stat st = {}; - if (stat(source.characters(), &st) < 0) { + if (lstat(source.characters(), &st) < 0) { auto original_errno = errno; report_error(String::formatted("stat: {}", strerror(original_errno))); return false; @@ -130,7 +130,7 @@ int perform_copy(Vector const& sources, String const& destination) static bool collect_move_work_items(String const& source, String const& destination, Vector& items) { struct stat st = {}; - if (stat(source.characters(), &st) < 0) { + if (lstat(source.characters(), &st) < 0) { auto original_errno = errno; report_error(String::formatted("stat: {}", strerror(original_errno))); return false; @@ -191,7 +191,7 @@ int perform_move(Vector const& sources, String const& destination) static bool collect_delete_work_items(String const& source, Vector& items) { struct stat st = {}; - if (stat(source.characters(), &st) < 0) { + if (lstat(source.characters(), &st) < 0) { auto original_errno = errno; report_error(String::formatted("stat: {}", strerror(original_errno))); return false;