From bd4024cf4d47c4d382f39f9a555856097bfda598 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 28 Oct 2023 10:08:57 +0300 Subject: [PATCH] chown --- coreutils/chown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);