~mzanetti/reminders-app/two-job-queues

« back to all changes in this revision

Viewing changes to src/libqtevernote/resource.cpp

  • Committer: Michael Zanetti
  • Date: 2015-03-08 18:47:51 UTC
  • Revision ID: michael.zanetti@canonical.com-20150308184751-r23v3651kcap0i9d
improve job queuing further

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
}
60
60
 
61
 
bool Resource::isCached(const QString &hash)
 
61
bool Resource::isCached()
62
62
{
63
 
    QDir cacheDir(NotesStore::instance()->storageLocation());
64
 
    foreach (const QString fi, cacheDir.entryList()) {
65
 
        if (fi.contains(hash)) {
66
 
            return true;
67
 
        }
68
 
    }
69
 
    return false;
 
63
    QFileInfo fi(m_filePath);
 
64
    return fi.exists();
70
65
}
71
66
 
72
67
Resource::Resource(const QString &path, QObject *parent):