Skip to content

Commit

Permalink
Merge pull request #2609 from nextcloud/backport/2596/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: remove nextcloud_photos_ tmp files when done
  • Loading branch information
AndyScherzinger authored Sep 4, 2024
2 parents 371c577 + eb15bd9 commit f7505ae
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 f7505ae

Please sign in to comment.