Ignore:
Timestamp:
Sep 14, 2016, 3:36:15 PM (9 years ago)
Author:
bird
Message:

rewrote kmk_redirect to skip the separate process. Added chache invalidation after directory deletion for addressing kmk rebuild and fetching.

File:
1 edited

Legend:

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

    r2466 r2912  
    6060# include "mscfakes.h"
    6161#endif
     62#if defined(KMK) && defined(KBUILD_OS_WINDOWS)
     63extern int dir_cache_deleted_directory(const char *pszDir);
     64#endif
    6265
    6366static int rm_path(char *);
     
    135138                                continue;
    136139                        /* (only ignored doesn't exist errors fall thru) */
    137                 } else if (vflag) {
    138                         printf("%s\n", *argv);
     140                } else {
     141#if defined(KMK) && defined(KBUILD_OS_WINDOWS)
     142                        dir_cache_deleted_directory(*argv);
     143#endif
     144                        if (vflag) {
     145                                printf("%s\n", *argv);
     146                        }
    139147                }
    140148                if (pflag)
     
    178186
    179187                if (rmdir(path) < 0) {
    180                         if (ignore_fail_on_non_empty && (errno == ENOTEMPTY || errno == EPERM || errno == EACCES || errno == EINVAL || errno == EEXIST))
     188                        if (   ignore_fail_on_non_empty
     189                            && (   errno == ENOTEMPTY || errno == EPERM || errno == EACCES || errno == EINVAL || errno == EEXIST))
    181190                                break;
    182191                        if (!ignore_fail_on_not_exist || errno != ENOENT) {
     
    185194                        }
    186195                }
     196#if defined(KMK) && defined(KBUILD_OS_WINDOWS)
     197                else {
     198                        dir_cache_deleted_directory(path);
     199                }
     200#endif
    187201                if (vflag)
    188202                        printf("%s\n", path);
Note: See TracChangeset for help on using the changeset viewer.