Changeset 982


Ignore:
Timestamp:
May 27, 2007, 10:41:16 PM (18 years ago)
Author:
bird
Message:

ignore_fail_on_not_exist should influence the out loop too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/rmdir.c

    r946 r982  
    115115                if (rmdir(*argv) < 0) {
    116116                        if (    (!ignore_fail_on_non_empty || (errno != ENOTEMPTY && errno != EPERM && errno != EACCES && errno != EINVAL))
    117                                 &&      (!ignore_fail_on_not_exist || errno != ENOENT)) {
     117                            &&  (!ignore_fail_on_not_exist || errno != ENOENT)) {
    118118                                warn("%s", *argv);
    119119                                errors = 1;
     120                                continue;
    120121                        }
    121                 } else {
    122                         if (vflag)
    123                                 printf("%s\n", *argv);
    124                         if (pflag)
    125                                 errors |= rm_path(*argv);
     122                        if (!ignore_fail_on_not_exist || errno != ENOENT)
     123                                continue;
     124                        /* (only ignored doesn't exist errors fall thru) */
     125                } else if (vflag) {
     126                        printf("%s\n", *argv);
    126127                }
     128                if (pflag)
     129                        errors |= rm_path(*argv);
    127130        }
    128131
Note: See TracChangeset for help on using the changeset viewer.