Changeset 695 for trunk/src/gmake


Ignore:
Timestamp:
Dec 9, 2006, 4:38:55 PM (19 years ago)
Author:
bird
Message:

Ignore EINVAL too so rmdir . doesn't fail when we're trying to ignore failures.

File:
1 edited

Legend:

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

    r694 r695  
    120120        for (errors = 0; *argv; argv++) {
    121121                if (rmdir(*argv) < 0) {
    122                         if (    (!ignore_fail_on_non_empty || (errno != ENOTEMPTY && errno != EPERM && errno != EACCES))
     122                        if (    (!ignore_fail_on_non_empty || (errno != ENOTEMPTY && errno != EPERM && errno != EACCES && errno != EINVAL))
    123123                                &&      (!ignore_fail_on_not_exist || errno != ENOENT)) {
    124124                                warn("%s", *argv);
     
    169169
    170170                if (rmdir(path) < 0) {
    171                         if (ignore_fail_on_non_empty && (errno == ENOTEMPTY ||  errno == EPERM || errno == EACCES))
     171                        if (ignore_fail_on_non_empty && (errno == ENOTEMPTY || errno == EPERM || errno == EACCES || errno == EINVAL))
    172172                                break;
    173173                        if (!ignore_fail_on_not_exist || errno != ENOENT) {
Note: See TracChangeset for help on using the changeset viewer.