pathut: windows error message
This commit is contained in:
parent
013642b994
commit
a85b1084c5
@ -1303,16 +1303,18 @@ bool PathDirContents::opendir()
|
|||||||
SYSPATH(dp, sysdir);
|
SYSPATH(dp, sysdir);
|
||||||
m->dirhdl = OPENDIR(sysdir);
|
m->dirhdl = OPENDIR(sysdir);
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int rc = GetLastError();
|
if (nullptr == m->dirhdl) {
|
||||||
LOGERR("opendir failed: LastError " << rc << endl);
|
int rc = GetLastError();
|
||||||
if (rc == ERROR_NETNAME_DELETED) {
|
LOGERR("opendir failed: LastError " << rc << endl);
|
||||||
// 64: share disconnected.
|
if (rc == ERROR_NETNAME_DELETED) {
|
||||||
// Not too sure of the errno in this case.
|
// 64: share disconnected.
|
||||||
// Make sure it's not one of the permissible ones
|
// Not too sure of the errno in this case.
|
||||||
errno = ENODEV;
|
// Make sure it's not one of the permissible ones
|
||||||
|
errno = ENODEV;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ! (nullptr == m->dirhdl);
|
return nullptr != m->dirhdl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PathDirContents::rewinddir()
|
void PathDirContents::rewinddir()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user