summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--project2/files/presenterCache.cpp4
-rw-r--r--project2/xml/xmlCache.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/project2/files/presenterCache.cpp b/project2/files/presenterCache.cpp
index da63bf3..7c81ff8 100644
--- a/project2/files/presenterCache.cpp
+++ b/project2/files/presenterCache.cpp
@@ -252,7 +252,9 @@ class FilePresenterCacheLoader : public ElementLoader::For<FilePresenterCache> {
void onIdle() override
{
try {
- emptyDir(FilePresenterCache::Store);
+ if (boost::filesystem::is_directory(FilePresenterCache::Store)) {
+ emptyDir(FilePresenterCache::Store);
+ }
}
catch (...) {
Logger()->messagebf(LOG_WARNING, "Failed to purge presenter caches from %s", FilePresenterCache::Store);
diff --git a/project2/xml/xmlCache.cpp b/project2/xml/xmlCache.cpp
index d6e2e04..649ce02 100644
--- a/project2/xml/xmlCache.cpp
+++ b/project2/xml/xmlCache.cpp
@@ -90,7 +90,9 @@ class CustomXmlCacheLoader : public ElementLoader::For<XmlCache> {
void onIdle() override
{
try {
- emptyDir(XmlCache::Store);
+ if (boost::filesystem::is_directory(XmlCache::Store)) {
+ emptyDir(XmlCache::Store);
+ }
}
catch (...) {
Logger()->messagebf(LOG_WARNING, "Failed to purge caches from %s", XmlCache::Store);