Browse files

Revert "Check return of stat64 from XFileUtils.cpp"

This reverts commit d31305c.

Returning FALSE from FindNextFile() means that there are no more files
in the directory. Therefore a failing stat64() call should not cause
FALSE to be returned. It is also not a fatal error, it will just mean we
do not get much actual information about the file.

stat64() can fail e.g. on broken symlinks, so this commit caused files
in directories that contain broken symlinks to be only partially shown.
  • Loading branch information...
1 parent 054a227 commit 13c4fa35273556c821a4206f5665c1223f149ff0 @anssih anssih committed Oct 9, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 xbmc/linux/XFileUtils.cpp
@@ -153,9 +153,7 @@ BOOL FindNextFile(HANDLE hHandle, LPWIN32_FIND_DATA lpFindData)
struct stat64 fileStat;
memset(&fileStat, 0, sizeof(fileStat));
- if (stat64(strFileNameTest, &fileStat) == -1)
- return FALSE;
+ stat64(strFileNameTest, &fileStat);
bool bIsDir = false;
if (S_ISDIR(fileStat.st_mode))

0 comments on commit 13c4fa3

Please sign in to comment.