~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/cached_directory.cc

  • Committer: Brian Aker
  • Date: 2010-07-20 02:17:09 UTC
  • mto: This revision was merged to the branch mainline in revision 1665.
  • Revision ID: brian@gaz-20100720021709-1yeehbw8d5vbtmlc
Removed identifier bit

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
#include "config.h"
29
29
 
30
 
#include "drizzled/definitions.h"
31
 
 
32
30
#include <sys/types.h>
33
31
#include <sys/stat.h>
34
32
#include <unistd.h>
127
125
  while ((retcode= readdir_r(dirp, &buffer.entry, &result)) == 0 &&
128
126
         result != NULL)
129
127
  {
130
 
    std::string buffered_fullpath;
131
128
    if (! allowed_exts.empty())
132
129
    {
133
130
      char *ptr= rindex(result->d_name, '.');
151
148
        {
152
149
          struct stat entrystat;
153
150
 
154
 
          if (result->d_name[0] == '.') // We don't pass back anything hidden at the moment.
 
151
          if (result->d_name[0] == '.')
155
152
            continue;
156
153
 
157
 
          buffered_fullpath.append(in_path);
158
 
          if (buffered_fullpath[buffered_fullpath.length()] != '/')
159
 
            buffered_fullpath.append(1, FN_LIBCHAR);
160
 
 
161
 
          buffered_fullpath.assign(result->d_name);
162
 
 
163
 
          stat(buffered_fullpath.c_str(), &entrystat);
 
154
          stat(result->d_name, &entrystat);
164
155
 
165
156
          if (S_ISDIR(entrystat.st_mode))
166
157
          {
172
163
        {
173
164
          struct stat entrystat;
174
165
 
175
 
          buffered_fullpath.append(in_path);
176
 
          if (buffered_fullpath[buffered_fullpath.length()] != '/')
177
 
            buffered_fullpath.append(1, FN_LIBCHAR);
178
 
 
179
 
          buffered_fullpath.assign(result->d_name);
180
 
 
181
 
          stat(buffered_fullpath.c_str(), &entrystat);
 
166
          stat(result->d_name, &entrystat);
182
167
 
183
168
          if (S_ISREG(entrystat.st_mode))
184
169
          {