This commit is contained in:
Your Name 2023-10-28 10:08:57 +03:00
parent 112ecf8fb5
commit bd4024cf4d

View File

@ -27,7 +27,7 @@ char *make_path(const char *src, const char *dst) {
size_t len = strlen(src) + strlen(dst) + 2;
char *full_path = malloc(len + 1);
if (full_path == NULL) {
fprintf(stderr, "cp: malloc() returned NULL\n");
fprintf(stderr, "chown: malloc() returned NULL\n");
return NULL;
}
@ -65,7 +65,7 @@ int cntree(const char *dst) {
if (get_stat(dst, &stat_path))
return 1;
if (!S_ISDIR(stat_path.st_mode))
if (!S_ISDIR(stat_path.st_mode) || r_flag)
return ret;
DIR *dir = opendir(dst);