]> git.ipfire.org Git - location/libloc.git/commit
location-importer: Only delete override data if we are sure to have a valid replacement
authorPeter Müller <peter.mueller@ipfire.org>
Sun, 5 Jun 2022 10:04:50 +0000 (10:04 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 5 Jul 2022 13:57:44 +0000 (13:57 +0000)
commit68fdeb3bc0d25d41ccf448caafe5edb46f467024
tree4b9d7ae2f52a3c373a9f8eb61b42002e99428d32
parenta4c22636cea523fa809eaa4a5f15c85532f806ed
location-importer: Only delete override data if we are sure to have a valid replacement

The current way of truncating all override data straight away leaves us
with no data at all, should a source turn out to be unreachable or
returning bogus files (yes, Cloudflare, I _am_ looking at you).

It is therefore better to only delete data we know to have a valid
replacement for, rather than just dropping the source altogether.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/location-importer.in