propagator batching when removing thumbnails
This commit is contained in:
parent
1fddd62c1c
commit
dfcaeeabb3
|
@ -410,6 +410,10 @@ class Preview {
|
||||||
* Deletes all previews of a file
|
* Deletes all previews of a file
|
||||||
*/
|
*/
|
||||||
public function deleteAllPreviews() {
|
public function deleteAllPreviews() {
|
||||||
|
$thumbnailMount = $this->userView->getMount($this->getThumbnailsFolder());
|
||||||
|
$propagator = $thumbnailMount->getStorage()->getPropagator();
|
||||||
|
$propagator->beginBatch();
|
||||||
|
|
||||||
$toDelete = $this->getChildren();
|
$toDelete = $this->getChildren();
|
||||||
$toDelete[] = $this->getFileInfo();
|
$toDelete[] = $this->getFileInfo();
|
||||||
|
|
||||||
|
@ -426,6 +430,8 @@ class Preview {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$propagator->commitBatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue