Changeset 3353 for trunk


Ignore:
Timestamp:
May 7, 2007, 4:58:50 AM (18 years ago)
Author:
bird
Message:

rmdir doesn't resolve the last path component. Fixes #163.

Location:
trunk/libc/src/kNIX
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libc/src/kNIX/b_fsDirRemove.c

    r2929 r3353  
    4444     */
    4545    char szNativePath[PATH_MAX];
    46     int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_FULL_SYMLINK | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL);
     46    int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_PARENT | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL);
    4747    if (!rc)
    4848        rc = __libc_back_fsNativeDirRemove(szNativePath);
  • trunk/libc/src/kNIX/os2/b_fsNativeDirRemove.c

    r2929 r3353  
    5151
    5252    /*
    53      * OS/2 returns access denied when the directory
    54      * contains files or it is not a directory. Check for
    55      * directory/other and return failure accordingly.
     53     * - OS/2 returns access denied when the directory contains files
     54     *   or it is not a directory.
     55     * - OS/2 returns path not found when the directory is actually a file.
     56     *
     57     * So, check for directory/other and return failure accordingly.
    5658     */
    57     if (rc == ERROR_ACCESS_DENIED)
     59    if (    rc == ERROR_ACCESS_DENIED
     60        ||  rc == ERROR_PATH_NOT_FOUND)
    5861    {
    5962        struct stat s;
Note: See TracChangeset for help on using the changeset viewer.