diff 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
line wrap: on
line diff
--- a/data/fileio/FileSource.cpp	Mon Oct 27 18:15:20 2008 +0000
+++ b/data/fileio/FileSource.cpp	Mon Oct 27 20:29:55 2008 +0000
@@ -62,6 +62,12 @@
     m_reporter(reporter),
     m_refCounted(false)
 {
+
+    if (cacheMode == PersistentCache) {
+        std::cerr << "FileSource::FileSource: Persistent cache mode used for \"" << fileOrUrl.toStdString() << "\"" << std::endl;
+        exit(1);
+    }
+
 #ifdef DEBUG_FILE_SOURCE
     std::cerr << "FileSource::FileSource(" << fileOrUrl.toStdString() << ", " << cacheMode << ")" << std::endl;
 #endif
@@ -128,6 +134,12 @@
     m_reporter(reporter),
     m_refCounted(false)
 {
+
+    if (cacheMode == PersistentCache) {
+        std::cerr << "FileSource::FileSource: Persistent cache mode used for \"" << url.toString().toStdString() << "\"" << std::endl;
+        exit(1);
+    }
+
 #ifdef DEBUG_FILE_SOURCE
     std::cerr << "FileSource::FileSource(" << url.toString().toStdString() << ") [as url]" << std::endl;
 #endif