diff options
author | Thomas Amland <thomas.amland@gmail.com> | 2016-10-27 19:15:41 +0200 |
---|---|---|
committer | Thomas Amland <thomas.amland@gmail.com> | 2016-10-27 19:34:15 +0200 |
commit | 4f95561c54be88cc47735d4d9f3104c75d0ef00b (patch) | |
tree | 984524b5882c2aac32ea1d837f0bbf85c5fa36b5 | |
parent | 7d978065e9757a680ef4149a35547a7cfe677cff (diff) |
[addons] make sure temp dir exists before running CFileOperationJob
-rw-r--r-- | xbmc/addons/FilesystemInstaller.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xbmc/addons/FilesystemInstaller.cpp b/xbmc/addons/FilesystemInstaller.cpp index db3f0ac225..3483727b99 100644 --- a/xbmc/addons/FilesystemInstaller.cpp +++ b/xbmc/addons/FilesystemInstaller.cpp @@ -40,6 +40,9 @@ bool CFilesystemInstaller::InstallToFilesystem(const std::string& archive, const auto newAddonData = URIUtils::AddFileToFolder(m_tempFolder, StringUtils::CreateUUID()); auto oldAddonData = URIUtils::AddFileToFolder(m_tempFolder, StringUtils::CreateUUID()); + if (!CDirectory::Create(newAddonData)) + return false; + if (!UnpackArchive(archive, newAddonData)) { CLog::Log(LOGERROR, "Failed to unpack archive '%s' to '%s'", archive.c_str(), newAddonData.c_str()); |