This commit is contained in:
Your Name 2023-10-16 20:25:42 +03:00
parent 54c5165f0e
commit b5819fbc96
2 changed files with 5 additions and 3 deletions

View File

@ -89,14 +89,17 @@ int cptree(const char *src, const char *dst) {
if (S_ISDIR(stat_path.st_mode) == 0) {
if (copy(src, dst)) {
fprintf(stderr, "cp: %s: is not directory\n", src);
return -1;
return 1;
}
return 0;
}
else {
mkdir(dst, 0777);
if (mkdir(dst, 0777) < 0) {
fprintf(stderr, "cp: %s\n", strerror(errno));
return 1;
}
}
DIR *dir = opendir(src);

View File

@ -1 +0,0 @@
hshshs