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,12 +407,26 @@ stdio_getPDirEntryHandle(const uio_PDirHandle *pDirHandle, const char *name) {
|
||||
}
|
||||
|
||||
if (stat(path, &statBuf) == -1) {
|
||||
#ifdef __SYMBIAN32__
|
||||
// XXX: HACK: If we don't have access to a directory, we can still
|
||||
// have access to the underlying entries. We don't actually know
|
||||
// whether the entry is a directory, but I know of know way to find
|
||||
// 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);
|
||||
|
||||
if (S_ISREG(statBuf.st_mode)) {
|
||||
|
||||
Reference in New Issue
Block a user