Skip to content

Commit 8b25703

Browse files
committed
symbolic links should NOT be ignored
1 parent 3635c37 commit 8b25703

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/base/system.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ void fs_listdir(const char *dir, FS_LISTDIR_CALLBACK cb, int type, void *user)
19041904
while((entry = readdir(d)) != NULL)
19051905
{
19061906
str_copy(buffer + length, entry->d_name, (int) sizeof(buffer) - length);
1907-
if(cb(entry->d_name, entry->d_type == DT_UNKNOWN ? fs_is_dir(buffer) : entry->d_type == DT_DIR, type, user))
1907+
if(cb(entry->d_name, (entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK) ? fs_is_dir(buffer) : entry->d_type == DT_DIR, type, user))
19081908
break;
19091909
}
19101910

@@ -1973,7 +1973,7 @@ void fs_listdir_fileinfo(const char *dir, FS_LISTDIR_CALLBACK_FILEINFO cb, int t
19731973
info.m_TimeCreated = created;
19741974
info.m_TimeModified = modified;
19751975

1976-
if(cb(&info, entry->d_type == DT_UNKNOWN ? fs_is_dir(buffer) : entry->d_type == DT_DIR, type, user))
1976+
if(cb(&info, (entry->d_type == DT_UNKNOWN || entry->d_type == DT_LNK) ? fs_is_dir(buffer) : entry->d_type == DT_DIR, type, user))
19771977
break;
19781978
}
19791979

0 commit comments

Comments
 (0)