Skip to content

Commit

Permalink
Rename 'f' variable to 'filename'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Imroy committed Feb 24, 2014
1 parent 9969c99 commit bdcde1a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ops_dir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ int gridfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t of
&proj);
std::string lastFN;
while (cursor->more()) {
std::string f = cursor->next().getField("filename").String();
std::string rel = f.substr(path_start.length());
std::string filename = cursor->next()["filename"].String();
std::string rel = filename.substr(path_start.length());
if (rel.find("/") != std::string::npos)
continue;

/* If this filename matches the last filename we've seen, *do not* add it to the buffer because it's a duplicate filename */
if (lastFN != f)
filler(buf, rel.c_str() , NULL , 0);
if (lastFN != filename)
filler(buf, rel.c_str(), NULL, 0);

/* Update lastFN with our cursor's current filename */
lastFN = f;
lastFN = filename;
fprintf(stderr, "DEBUG: %s\n", lastFN.c_str());
}

Expand Down

0 comments on commit bdcde1a

Please sign in to comment.