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 and backportbot[bot] committed Aug 14, 2024
1 parent 2173659 commit eb15bd9
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 @@ -158,6 +158,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 @@ -171,5 +172,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 eb15bd9

Please sign in to comment.