Changeset 1778
- Timestamp:
- Jan 17, 2005, 4:25:13 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/lib/sys/b_fsDirRemove.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r1777 r1778 35 35 #include "b_fs.h" 36 36 #include <errno.h> 37 #include <sys/stat.h> 37 38 #include <InnoTekLIBC/backend.h> 38 39 #define __LIBC_LOG_GROUP __LIBC_LOG_GRP_BACK_FS … … 54 55 /* 55 56 * Resolve the path. 57 * (Symlinks should cause failure, so don't resolve last component.) 56 58 */ 57 59 char szNativePath[PATH_MAX]; 58 int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_ FULL| BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL);60 int rc = __libc_back_fsResolve(pszPath, BACKFS_FLAGS_RESOLVE_PARENT | BACKFS_FLAGS_RESOLVE_DIR, &szNativePath[0], NULL); 59 61 if (rc) 60 62 LIBCLOG_RETURN_INT(rc); … … 69 71 { 70 72 /* 71 * OS/2 returns access denied when the directory contains files. 73 * OS/2 returns access denied when the directory 74 * contains files or it is not a directory. Check for 75 * directory/other and return failure accordingly. 72 76 */ 73 77 if (rc == ERROR_ACCESS_DENIED) 74 rc = -ENOTEMPTY; 78 { 79 struct stat s; 80 rc = __libc_back_fsNativeFileStat(&szNativePath[0], &s); 81 if (!rc) 82 rc = S_ISDIR(s.st_mode) ? -ENOTEMPTY : -ENOTDIR; 83 } 75 84 else 76 85 rc = -__libc_native2errno(rc); -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.