Dirty hack for Symbian The Unholy.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3061 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -407,11 +407,25 @@ stdio_getPDirEntryHandle(const uio_PDirHandle *pDirHandle, const char *name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (stat(path, &statBuf) == -1) {
|
if (stat(path, &statBuf) == -1) {
|
||||||
// errno is set.
|
#ifdef __SYMBIAN32__
|
||||||
int savedErrno = errno;
|
// XXX: HACK: If we don't have access to a directory, we can still
|
||||||
uio_free(path);
|
// have access to the underlying entries. We don't actually know
|
||||||
errno = savedErrno;
|
// whether the entry is a directory, but I know of know way to find
|
||||||
return NULL;
|
// out. We just pretend that it is; worst case, a file which we can't
|
||||||
|
// access shows up as a directory which we can't access.
|
||||||
|
if (errno == EACCES) {
|
||||||
|
statBuf.st_mode = S_IFDIR;
|
||||||
|
// Fake a directory; the other fields of the stat
|
||||||
|
// structure are unused.
|
||||||
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
// errno is set.
|
||||||
|
int savedErrno = errno;
|
||||||
|
uio_free(path);
|
||||||
|
errno = savedErrno;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uio_free(path);
|
uio_free(path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user