Don't warn about broken symlinks.

This commit is contained in:
Glenn Maynard
2003-11-04 04:32:11 +00:00
parent adc4af1a48
commit 5d28964655
+5 -1
View File
@@ -106,11 +106,15 @@ void FileSet::LoadFromDir(const CString &dir)
struct stat st;
if( stat(ent->d_name, &st) == -1 )
{
/* If it's a broken symlink, ignore it. Otherwise, warn. */
if( lstat(ent->d_name, &st) == 0 )
continue;
/* Huh? */
if(LOG)
LOG->Warn("Got file '%s' in '%s' from list, but can't stat? (%s)",
ent->d_name, dir.c_str(), strerror(errno));
f.dir = false;
continue;
} else {
f.dir = (st.st_mode & S_IFDIR);
f.size = st.st_size;