Hi!
I am using this program to manage my offline maps for my Android app "OsmAnd". Unfortunately the freshly downloaded maps do not replace the old ones. After update, I have to old and the new one. I have to close offroad and do the renaming manually.
Apr 13, 2020 4:36:18 AM net.osmand.plus.download.DownloadFileHelper$1 reconnect
INFORMATION: OK 200
DOWNLOAD WARNING: I/O Fehler aufgetreten: old file can't be deleted
I have tried to delete the old map manually directly after download, and noticed that there is a file handle from java process. Very lickely the file handle was created to read from the map.
Is it possible to get rid of the file handle and change the way the map is loaded? If maps can be deleted while app running, the map update would be much more comfortable. I would appreciate it a lot!
Thank you for this simple and useful tool.
Hi,
hm, for me, it works. Can you send a console output of such a download, please?
TIA, Chris
Hi, a complete console output would be helpful.
Which OS, which java version are you using? Maybe a file rights problem??
win10 x64
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) Client VM (build 25.241-b07, mixed mode, sharing)
File permission is not a problem. When I try to delete a map while offroad is opened, I get an error stating "...is opened by Java (TM) Platform SE Binary. Close and retry...".
Attached complete console output. I have craeted a soft link from user home to another hdd.
Hi,
I published something that maybe fixes your problem. Are you able to fetch it from git or should I try to publish some binaries?
HTH, Chris
I've never built such a project. Binaries would be highly appreciated.
Hi,
let's try this inofficial beta version I've put here.
HTH, Chris
I've renamed the old jar file in installation folder and copied your beta release to this folder. Neither started from commandline nor started directly as Java executable I could delete the map. As a consequence the update did not work.
As you can delete maps while the app is started, should I start the app somehow different? Or add some parameter? Do I need to run it as admin?
Please start it on the command line and paste the output here. Thanks.
Alright, here we go.
Hi, if you try to do it as admin, it cannot harm. BR, Chris
Admin rights did not help. Should I use a certain Java version or cmd in command line except "java -jar pathToJar"?