diff --git a/coreutils/chown.c b/coreutils/chown.c index f0e8baf..c19b0bd 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -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);