comparison data/fileio/FileSource.cpp @ 468:70b333085952

* complete switching the code to use CachedFile -- now to tidy & fix the remaining flaws...
author Chris Cannam
date Mon, 27 Oct 2008 20:29:55 +0000
parents 2019d89ebcf9
children a8a7b8f698c8
comparison
equal deleted inserted replaced
467:c9b055f84326 468:70b333085952
60 m_done(false), 60 m_done(false),
61 m_leaveLocalFile(false), 61 m_leaveLocalFile(false),
62 m_reporter(reporter), 62 m_reporter(reporter),
63 m_refCounted(false) 63 m_refCounted(false)
64 { 64 {
65
66 if (cacheMode == PersistentCache) {
67 std::cerr << "FileSource::FileSource: Persistent cache mode used for \"" << fileOrUrl.toStdString() << "\"" << std::endl;
68 exit(1);
69 }
70
65 #ifdef DEBUG_FILE_SOURCE 71 #ifdef DEBUG_FILE_SOURCE
66 std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << ", " << cacheMode << ")" << std::endl; 72 std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << ", " << cacheMode << ")" << std::endl;
67 #endif 73 #endif
68 74
69 if (!canHandleScheme(m_url)) { 75 if (!canHandleScheme(m_url)) {
126 m_done(false), 132 m_done(false),
127 m_leaveLocalFile(false), 133 m_leaveLocalFile(false),
128 m_reporter(reporter), 134 m_reporter(reporter),
129 m_refCounted(false) 135 m_refCounted(false)
130 { 136 {
137
138 if (cacheMode == PersistentCache) {
139 std::cerr << "FileSource::FileSource: Persistent cache mode used for \"" << url.toString().toStdString() << "\"" << std::endl;
140 exit(1);
141 }
142
131 #ifdef DEBUG_FILE_SOURCE 143 #ifdef DEBUG_FILE_SOURCE
132 std::cerr << "FileSource::FileSource(" << url.toString().toStdString() << ") [as url]" << std::endl; 144 std::cerr << "FileSource::FileSource(" << url.toString().toStdString() << ") [as url]" << std::endl;
133 #endif 145 #endif
134 146
135 if (!canHandleScheme(m_url)) { 147 if (!canHandleScheme(m_url)) {