locusaction does not replace existing files

Jérôme shared this problem 3 months ago
Solved

When a locusaction downloads a .zip file and decompress it, it seems that if some files inside the zip already exist, they are not replaced. I do this to replace 3° SRTM with 1° SRTM (or to update existing outdated 1° SRTM):

<?xml version="1.0" encoding="UTF-8"?>

<locusActions>

<download>

<source><![CDATA[http://foo/srtm-alps-fr.zip]]></source>;

<dest><![CDATA[/data/srtm/srtm-alps-fr.zip]]></dest>

<after>extract|deleteSource|refreshMap</after>

</download>

</locusActions>

Comments (2)

photo
1

In fact, this seems to work if the new file has a different size (e.g. replace 3° SRTM with 1°), but not if it has the same size (e.g. update existing 1° SRTM).

photo
1

Hello,

thanks for the bug report. The issue really seems to be in the app not overwriting existing files with the same size.

I'm made a fix (but not tested it), so please give it a try with the next Locus Map version. Thanks

Menion