diff --git a/userspace/cp/main.cpp b/userspace/cp/main.cpp index bfd2a8a8f6..58d8a5c092 100644 --- a/userspace/cp/main.cpp +++ b/userspace/cp/main.cpp @@ -18,9 +18,9 @@ bool copy_file(const BAN::String& source, BAN::String destination) perror("stat"); return false; } - if (!S_ISREG(st.st_mode)) + if (S_ISDIR(st.st_mode)) { - fprintf(stderr, "%s: not a directory\n", source.data()); + fprintf(stderr, "%s: is a directory\n", source.data()); return false; }