aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShani-08 <Shani-08@users.noreply.github.com>2017-01-28 23:21:30 +0000
committerShani-08 <taacc14@gmail.com>2017-02-02 11:37:50 +0000
commitbf68ee5438cb0e1343e7a6c35df35e7a4fb36223 (patch)
treedbe10156ccdb33977353ab801f2a627b1ed72145
parente80803a74474e964731631a37314bddb83e8b335 (diff)
create archive_cache if not exists
-rw-r--r--xbmc/Application.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index c6ef0c0e08..13d2cfa511 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -1076,10 +1076,10 @@ void CApplication::CreateUserDirs() const
//Let's clear our archive cache before starting up anything more
auto archiveCachePath = CSpecialProtocol::TranslatePath("special://temp/archive_cache/");
- if (CDirectory::RemoveRecursive(archiveCachePath))
- CDirectory::Create(archiveCachePath);
- else
- CLog::Log(LOGWARNING, "Failed to remove the archive cache at %s", archiveCachePath.c_str());
+ if (CDirectory::Exists(archiveCachePath))
+ if (!CDirectory::RemoveRecursive(archiveCachePath))
+ CLog::Log(LOGWARNING, "Failed to remove the archive cache at %s", archiveCachePath.c_str());
+ CDirectory::Create(archiveCachePath);
}