From 4dc1a5d86c1e7c7db53107fed184a8c57a2ab993 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 28 Oct 2023 10:11:00 +0300 Subject: [PATCH] chown --- coreutils/chown.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/chown.c b/coreutils/chown.c index c19b0bd..07cc37f 100644 --- a/coreutils/chown.c +++ b/coreutils/chown.c @@ -65,7 +65,7 @@ int cntree(const char *dst) { if (get_stat(dst, &stat_path)) return 1; - if (!S_ISDIR(stat_path.st_mode) || r_flag) + if (!S_ISDIR(stat_path.st_mode) || !r_flag) return ret; DIR *dir = opendir(dst);