This commit is contained in:
Your Name 2024-03-16 15:35:20 +03:00
parent 0019cb1447
commit 1a14f8e484
1 changed files with 4 additions and 4 deletions

View File

@ -187,15 +187,15 @@ int main(int argc, char **argv) {
}
int ret = 0;
if (!access(argv[argc - 1], F_OK))
goto IF_EXSIST;
struct stat sb;
if (!mu_get_stat(NULL, argv[argc - 1], &sb))
if (S_ISDIR(sb.st_mode))
goto IF_EXSIST;
if (argc == 2)
ret = cptree(argv[0], argv[argc - 1]);
else {
IF_EXSIST:
for (int i = 0; i < argc - 1; i++) {
char *new_path = mu_make_path(f_flag, argv[argc - 1], basename(argv[i]));