Problem with changing default directories

Ingo Rau shared this problem 4 years ago
Solved

I tried out the new option to change the default directories: While I like to keep the Locus directory on my internal sdcard, I moved only the subDir "mapsOnline" with the cached online maps to extSdCard, because that potentially takes up a lot of space.

I moved it into extSdCard/Maps, because that's where my other maps are (personal, vector).


Now there are two problems:

  • After booting, a toast is displayed saying something like "Cannot acces file "/mnt/extSdCard/Maps/mapsOnline"... It must be a Locus message, as it's got orange background (don't know any other app that does this...). I assume that at this point, the extSdCard is not ready yet - but as I also didn't start Locus yet, it's a bit annoying.
  • In Locus, the mapsOnline directory is also displayed in the Maps screen under Personal. Of course, I included the parent directory, but I think Locus should realize that this is its own internal directory now and filter it from that list.
    I'm not even sure how Locus would treat these maps if I select them here - are they now immutable like the other personal maps, or are they still cache for online maps, loading missing parts when necessary?

Would be great if you could have a look into that... Thx!

Comments (20)

photo
2

Hi Ingo,

the folder structure on ext SDCard must be the same as on intern SD,

so try on extSD:

Locus -

-maps

-mapsOnline

-mapsVector

and copy e.g. your Vectormap to -mapsVector

after that you have to add these new map path with 3-dot button in map window

photo
2

Hi Balloni55!

Thank you, but you're talking about moving the Locus directory as a whole - that's not what I mean.

I'm referring to the new Settings > Miscellaneous > Default directories. Here you can explicitly define certain directories. And these can be totally outside the Locus directory structure (that's what it's all about after all). At least, if some directories are not acceptable, Locus should tell.

photo
photo
1

I would like to bump this, as there was no reaction from the developers so far - and Menion encouraged me to remind him of things that might have slipped his mind ;)

photo
2

First issue - hmm only what happen right after start is setting of automatic backup. Even that you have also personal maps directory on SD card, you see error message only for online map directory?


Second point - I think it is users problem (your in this case) if he moved cache for online maps into personal map directory. You should expect, that everything placed into personal maps directory will be used as a personal map. Anyway caching of online maps should still work as expected.


Better solution? Directory maps with subdirs online, personal, vector and these three directories set in settings.


Extra filtering? Cannot agree. This is very advanced feature and some automatic removing of nested directories may be unwanted effect in some cases.

photo
3

Hi Menion!

Thanx for your answer!


Second issue first:

I thought about it again and I agree with you. My initial idea was confusing, and extra checks/filtering give little gain, but possible problems. Being a programmer myself, I know how hard to handle these things can become.

So I moved mapsOnline to /storage/extSdCard/Locus, and I also moved srtm there. Works now as expected.


First point, however:

After I moved srtm, I rebooted, and the message appeared again, but not for the srtm directory. I managed to do a screenshot (attached). So I still think there must be something wrong going on.

photo
2

Thanks for understanding second issue!


To first one - I was searching where should be a problem and I've probably found it. Automatic backup has to be re-set right after restart. During this, Locus check also SD card and do some basic tasks. One of these tasks is prepare of ".nomedia" files into Locus/mapsOnline/custom directory which caused this issue.


I've added 30 seconds delay to this feature so it should be enough for system to prepare card. So I believe issue fixed, you'll see in next version.

photo
2

Great, thx! :) I'll check it out then!

photo
2

Version 3.7.0: Same behaviour, sorry!

It may be because I have a 128GB SD card and Android takes a while to initialize.

May I propose that you just suppress the error message? I mean, it's "nice" that Locus tries to take care of that .nomedia file, but it's not a catastrophe when it's not there. And like this, the error message doesn't help either.

What do you think?

photo
1

Hmm still there? I'm surprised because I expected that 30 seconds after start, card should be already ready to use.


Ok, let's try second try ... I'll improve delay to 60 seconds (from 30) and we will see.

photo
1

Seems to be ok in 3.7.1 (judging from one reboot, but fine for me ;)

Thx.

photo
2

fine, so 60 seconds seems to be enough time for device to do all required initialization stuff after reboot. Useful information also for me. And glad it helps.

photo
photo
1

Sorry, but the error messages for missing directories on the SD card are back. I got a new phone (S5 neo, my Note4 had internal memory failure), and as it's got less internal storage than the Note4, I had to move some diretories to the external card, again.

Now it's definitely not slow booting up. In fact, I timed it and the first red error toast appears 40s after the boot logo appeared. I don't know when Android first activates apps that are started on boot, but doesn't matter in this case, because there's definitely not a 60s delay (anymore).

Could you please have a look at it?

photo
1

Hello Ingo, quite interesting. I'm checking Locus source code and there is really still set "if autoback is enabled, wait 60 second and then setup correct time for backup".


What exactly is on this error message?

photo
1

I managed a screenshot (didn't think the service is already active that early ;). It's just before I have to enter my SIM PIN:

0a05610047b231f4823d2d138351d178


Here's a screenshot of my directory settings:

1c3e6fe04e4bf21958b268d37e367638


Any logs I can provide?

photo
1

Should mention:

Second error toast appears for the mapsOnline/ directory, but none for the data/srtm/ directory, which I also adjusted (not visible on the screenshot above).

photo
1

Hmm interesting. This have to be some other problem.


One more test ... are you using widget? If so, try to remove it if it helps.

photo
1

Good call! Removed the widget, messages are gone. Makes sense that it's something different, because the original toasts were with orange background, these are with red.

photo
1

Ah damn, this is really serious problem to solve. Widget needs initialized core of Locus Map application. But initialization also needs initialized basic FileSystem because it needs to load config.cfg file.


Fortunately I believe this is not something serious, just one/two notifications at start.


EDIT: I've maybe removed this notification for online maps and for vector maps as they may be initialized a little bit later. So maybe it will be solved ;). You will see.

photo
1

All fine in 3.18, thx!

photo
1

Perfect, I thank you!

photo