Skip to content

Commit

Permalink
fix: remove nextcloud_photos_ tmp files when done
Browse files Browse the repository at this point in the history
Fixes #2072 

Signed-off-by: Josh <[email protected]>
  • Loading branch information
joshtrichards authored Aug 13, 2024
1 parent aeea1f5 commit 6471c67
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Service/ReverseGeoCoderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public function buildKDTree($force = false): void {
$persister->convert($tree, $kdTreeTmpFileName);
$kdTreeString = file_get_contents($kdTreeTmpFileName);
$this->geoNameFolder()->newFile('cities1000.bin', $kdTreeString);
unlink($kdTreeTmpFileName);
}

private function loadKdTree(): void {
Expand All @@ -162,5 +163,6 @@ private function loadKdTree(): void {
file_put_contents($kdTreeTmpFileName, $kdTreeFileContent);
$fsTree = new FSKDTree($kdTreeTmpFileName, new ItemFactory());
$this->fsSearcher = new NearestSearch($fsTree);
unlink($kdTreeTmpFileName);
}
}

0 comments on commit 6471c67

Please sign in to comment.