[Scummvm-cvs-logs] SF.net SVN: scummvm: [21616] scummvm/trunk/backends/fs/posix/posix-fs.cpp
sev at users.sourceforge.net
sev at users.sourceforge.net
Tue Apr 4 16:54:03 CEST 2006
Revision: 21616
Author: sev
Date: 2006-04-04 16:52:56 -0700 (Tue, 04 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21616&view=rev
Log Message:
-----------
Allow symlinks to directories for FS;es with D_TYPE support.
Modified Paths:
--------------
scummvm/trunk/backends/fs/posix/posix-fs.cpp
Modified: scummvm/trunk/backends/fs/posix/posix-fs.cpp
===================================================================
--- scummvm/trunk/backends/fs/posix/posix-fs.cpp 2006-04-04 23:44:27 UTC (rev 21615)
+++ scummvm/trunk/backends/fs/posix/posix-fs.cpp 2006-04-04 23:52:56 UTC (rev 21616)
@@ -146,7 +146,13 @@
entry._isDirectory = S_ISDIR(st.st_mode);
#else
entry._isValid = (dp->d_type == DT_DIR) || (dp->d_type == DT_REG) || (dp->d_type == DT_LNK);
- entry._isDirectory = (dp->d_type == DT_DIR);
+ if (dp->d_type == DT_LNK) {
+ struct stat st;
+ stat(entry._path.c_str(), &st);
+ entry._isDirectory = S_ISDIR(st.st_mode);
+ } else {
+ entry._isDirectory = (dp->d_type == DT_DIR);
+ }
#endif
// Skip files that are invalid for some reason (e.g. because we couldn't
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list