CachedDirectory silently fails to add entries if stat() fails

Bug #738022 reported by Stewart Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Low
Stewart Smith
7.1
Fix Released
Low
Stewart Smith

Bug Description

=== modified file 'drizzled/cached_directory.cc'
--- drizzled/cached_directory.cc 2011-02-24 13:59:28 +0000
+++ drizzled/cached_directory.cc 2011-03-19 06:28:41 +0000
@@ -159,9 +159,9 @@ bool CachedDirectory::open(const string

           buffered_fullpath.append(result->d_name);

- stat(buffered_fullpath.c_str(), &entrystat);
+ int err= stat(buffered_fullpath.c_str(), &entrystat);

- if (S_ISDIR(entrystat.st_mode))
+ if (err == 0 && S_ISDIR(entrystat.st_mode))
           {
             entries.push_back(new Entry(result->d_name));
           }

or something.

we should probably always go for some kind of absolute paths

Related branches

Stewart Smith (stewart)
Changed in drizzle:
assignee: nobody → Stewart Smith (stewart)
importance: Undecided → Low
milestone: none → 2011-04-11
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.