mirror of https://github.com/procxx/kepka.git
Fix saving cache from InMemoryLocation.
This commit is contained in:
parent
74ef8104a7
commit
b35b6c4449
|
@ -31,7 +31,7 @@ void UpdateCloudFile(
|
|||
if (!update) {
|
||||
return;
|
||||
}
|
||||
const auto cacheBytes = !data.bytes.isEmpty()
|
||||
auto cacheBytes = !data.bytes.isEmpty()
|
||||
? data.bytes
|
||||
: file.location.file().data.is<InMemoryLocation>()
|
||||
? file.location.file().data.get_unchecked<InMemoryLocation>().bytes
|
||||
|
@ -41,7 +41,7 @@ void UpdateCloudFile(
|
|||
cache.putIfEmpty(
|
||||
cacheKey,
|
||||
Storage::Cache::Database::TaggedValue(
|
||||
base::duplicate(data.bytes),
|
||||
std::move(cacheBytes),
|
||||
Data::kImageCacheTag));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -378,8 +378,6 @@ struct PlainUrlLocation {
|
|||
};
|
||||
|
||||
struct InMemoryLocation {
|
||||
~InMemoryLocation() = default;
|
||||
|
||||
QByteArray bytes;
|
||||
|
||||
friend inline bool operator==(
|
||||
|
|
Loading…
Reference in New Issue