~ps-jenkins/mediascanner2/trusty-proposed

« back to all changes in this revision

Viewing changes to src/daemon/Scanner.cc

  • Committer: Tarmac
  • Author(s): Jussi Pakkanen
  • Date: 2014-02-19 09:03:51 UTC
  • mfrom: (206.1.1 mediascanner)
  • Revision ID: tarmac-20140219090351-7fo7chygzqj1d8hi
Use lstat to avoid loops.

Approved by James Henstridge, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
        if(fname[0] == '.') // Ignore hidden files and dirs.
53
53
            continue;
54
54
        string fullpath = root + "/" + fname;
55
 
        stat(fullpath.c_str(), &statbuf);
 
55
        lstat(fullpath.c_str(), &statbuf);
56
56
        if(S_ISREG(statbuf.st_mode)) {
57
57
            try {
58
58
                DetectedFile d = extractor->detect(fullpath);