diff options
author | Eugene Sandulenko | 2006-04-04 23:52:56 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-04-04 23:52:56 +0000 |
commit | 66d8b85463da60f0b88c3f7d6068df502d940546 (patch) | |
tree | a492e62ee9637a81cf54e7d5ebab930a9bac6980 | |
parent | 004a39b3af8cb8ac1725fcea66ea45862419e49d (diff) | |
download | scummvm-rg350-66d8b85463da60f0b88c3f7d6068df502d940546.tar.gz scummvm-rg350-66d8b85463da60f0b88c3f7d6068df502d940546.tar.bz2 scummvm-rg350-66d8b85463da60f0b88c3f7d6068df502d940546.zip |
Allow symlinks to directories for FS;es with D_TYPE support.
svn-id: r21616
-rw-r--r-- | backends/fs/posix/posix-fs.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp index e63517d565..687a958e4a 100644 --- a/backends/fs/posix/posix-fs.cpp +++ b/backends/fs/posix/posix-fs.cpp @@ -146,7 +146,13 @@ FSList POSIXFilesystemNode::listDir(ListMode mode) const { 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 |