aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-09 13:12:44 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-09 13:12:46 +0200
commit0f56cd4b6a99ef11749425c9b15a3661a6f9a2cb (patch)
tree478e9b5a3cb6a30634e67108d8bbb93f47f73c17
parentcd686f3f6099457a3115e758bf3da7e148ba432d (diff)
Fix content cache partial download file
-rw-r--r--src/Cache.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp
index 0b4bfbf..16cd4d0 100644
--- a/src/Cache.cpp
+++ b/src/Cache.cpp
@@ -217,7 +217,8 @@ namespace dchat
imageDownloadMutex.lock();
contentUrlCache[it->url] = contentByUrlResult;
- boost::filesystem::path downloadingFilepath = filepath / ".downloading";
+ boost::filesystem::path downloadingFilepath = filepath;
+ downloadingFilepath += ".downloading";
// Intentionally ignore failure, program should not crash if we fail to remove these files...
boost::system::error_code err;
boost::filesystem::remove(downloadingFilepath, err);
@@ -277,7 +278,8 @@ namespace dchat
odhtdb::Hash urlHash(url.data(), url.size());
filepath /= urlHash.toString();
- boost::filesystem::path downloadingFilepath = filepath / ".downloading";
+ boost::filesystem::path downloadingFilepath = filepath;
+ downloadingFilepath += ".downloading";
if(boost::filesystem::exists(downloadingFilepath))
{
// Intentionally ignore failure, program should not crash if we fail to remove these files...