~vthompson/mediascanner2/add-case-insensitive-sorting

« back to all changes in this revision

Viewing changes to test/basic.cc

  • Committer: CI bot
  • Author(s): Jussi Pakkanen
  • Date: 2014-09-25 11:57:51 UTC
  • mfrom: (281.2.2 mediascanner)
  • Revision ID: ps-jenkins@lists.canonical.com-20140925115751-2mmrr9gjsyy6i65f
Use fallback data for crasher files so they at least show up in scope queries. 
Approved by: James Henstridge, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
    try {
149
149
        while(true) {
150
150
            auto d  = s.next();
151
 
            // If the file is unchanged or known bad, skip it.
 
151
            // If the file is unchanged or known bad, do fallback.
152
152
            if (store.is_broken_file(d.filename, d.etag)) {
153
 
                fprintf(stderr, "Skipping unscannable file %s.\n", d.filename.c_str());
 
153
                fprintf(stderr, "Using fallback data for unscannable file %s.\n", d.filename.c_str());
 
154
                store.insert(extractor.fallback_extract(d));
154
155
                continue;
155
156
            }
156
157
            if(d.etag == store.getETag(d.filename)) {
158
159
            }
159
160
            store.insert_broken_file(d.filename, d.etag);
160
161
            store.insert(extractor.extract(d));
161
 
            // If the above line crashes, then brokenness
 
162
            // If the above line crashes, then brokenness of this file
162
163
            // persists.
163
 
            store.remove_broken_file(d.filename);
164
164
        }
165
165
    } catch(const StopIteration &e) {
166
166
    }