chown
This commit is contained in:
parent
112ecf8fb5
commit
bd4024cf4d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user