Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Config broken after Micro SD card change #1787

@PHolzwarth

Description

@PHolzwarth

Issue Type

[ ] Question
[x] Bug
[ ] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation

Description and/or steps/code to reproduce the problem

  1. have a micro SD card in your device that has more free memory than the main storage.
  2. use OsmDroid
  3. exchange or remove the micro SD card
  4. use OsmDroid again

-> Configuration will still try to use the previous path.

Suggested fix

In DefaultConfigurationProvider, exchange line 328

        if (!prefs.contains("osmdroid.basePath")) {

with these two lines:

        String basePathStr= prefs.getString("osmdroid.basePath", null);
        if (basePathStr==null || !new File(basePathStr).exists()) {

Environment

If it's a bug, version(s) of android this affects:

All

Version of osmdroid the issue relates to:

6.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions