Changeset 91620 in vbox for trunk/src/VBox/Runtime/r3/posix
- Timestamp:
- Oct 7, 2021 8:11:46 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147343
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
r90781 r91620 107 107 { 108 108 rc = errno; 109 /*bool fVerifyIsDir = true; - Windows returns VERR_ALREADY_EXISTS, so why bother with this. */110 #ifdef RT_OS_SOLARIS111 109 /* 112 * mkdir on nfs mount points has been/is busted in various 113 * during the Nevada development cycle. We've observed: 114 * - Build 111b (2009.06) returns EACCES. 115 * - Build ca. 70-80 returns ENOSYS. 110 * Solaris mkdir returns ENOSYS on autofs directories, and also 111 * did this apparently for NFS mount points in some Nevada 112 * development builds. It also returned EACCES when it should 113 * have returned EEXIST, which actually is within the POSIX 114 * spec (not that I like this interpretation, but it seems 115 * valid). Check ourselves. 116 116 */ 117 117 if ( rc == ENOSYS … … 119 119 { 120 120 rc = RTErrConvertFromErrno(rc); 121 /*fVerifyIsDir = false; We'll check if it's a dir ourselves since we're going to stat() anyway. */122 121 if (!stat(pszNativePath, &st)) 123 {124 122 rc = VERR_ALREADY_EXISTS; 125 /* Windows returns VERR_ALREADY_EXISTS, so why bother with this:126 if (!S_ISDIR(st.st_mode))127 rc = VERR_IS_A_FILE; */128 }129 123 } 130 124 else 131 125 rc = RTErrConvertFromErrno(rc); 132 #else133 rc = RTErrConvertFromErrno(rc);134 #endif135 #if 0 /* Windows returns VERR_ALREADY_EXISTS, so why bother with this. */136 if ( rc == VERR_ALREADY_EXISTS137 /*&& fVerifyIsDir == true*/)138 {139 /*140 * Verify that it really exists as a directory.141 */142 struct stat st;143 if (!stat(pszNativePath, &st) && !S_ISDIR(st.st_mode))144 rc = VERR_IS_A_FILE;145 }146 #endif147 126 } 148 127 }
Note:
See TracChangeset
for help on using the changeset viewer.