forked from Bananymous/banan-os
cp: allow copying all files except directories
The old condition seemed odd. This allows taking screen shots by copying the /dev/fb0.
This commit is contained in:
parent
ff550785a7
commit
7090388c70
|
@ -18,9 +18,9 @@ bool copy_file(const BAN::String& source, BAN::String destination)
|
||||||
perror("stat");
|
perror("stat");
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue