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 <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards authored and backportbot[bot] committed Aug 14, 2024
1 parent 3254173 commit d18b2f6
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 @@ -166,6 +166,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 @@ -179,5 +180,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 d18b2f6

Please sign in to comment.