if (ptr->status() == WaitingToLoad)
ptr->startLoading();
}
- if (cache_queue_.size()) {
+ if (!cache_queue_.empty()) {
startLoader();
} else {
stopLoader();
// signal needs to be disconnected.
sc_.disconnect();
cached_item_.reset();
- Cache::get().remove(old_file);
+ if (status_ != Converting) {
+ Cache::get().remove(old_file);
+ } else {
+ //TODO remove cache item when it is not busy any more, see #7163
+ }
}
status_ = cached_item_.get() ? cached_item_->status() : WaitingToLoad;