Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Can only load databases from standard database location #376

Closed
dalewking opened this issue Apr 21, 2016 · 7 comments
Closed

Can only load databases from standard database location #376

dalewking opened this issue Apr 21, 2016 · 7 comments

Comments

@dalewking
Copy link

Issue #91 added the ability to specify database files in arbitrary locations not just in the standard location for databases that the context knows about. You can specify your own DatabaseFilesProvider to specify a list of database files, but commit 7a27fc7 broke this support. The problem is this code in SqliteDatabaseDriver.getDatabaseNames():

  for (File database : tidiedList) {
    String name = database.getName();
    mDatabases.add(name);
  }

This code throws away the path information so all you have is the file name and then when you ask the context to open it, it tries to open it from the standard database directory.

@dalewking
Copy link
Author

Any updates?

@jasta
Copy link
Contributor

jasta commented Jun 2, 2016

Partially addressed this by merging #367, and formally fixed in #392.

@jasta jasta closed this as completed Jun 2, 2016
@jasta
Copy link
Contributor

jasta commented Jun 2, 2016

...and thank you for your patience on this issue!

@dalewking
Copy link
Author

Waiting patiently for net release to try it

@dalewking
Copy link
Author

Still waiting on this to be released

@jasta
Copy link
Contributor

jasta commented Mar 11, 2017

@dalewking updated the PR in #392, would you mind verifying that this addresses your issue by pulling the branch (git checkout -b databaseid-mapping && git pull https://github.com/jasta/stetho.git databaseid-mapping && ./gradlew installArchives). If it works as you expect, I'll go ahead and merge and it'll be in the next release (which is coming soon due to other changes we're working on)

@dalewking
Copy link
Author

I believe I evaluated that PR when it came out and it worked correctly but I cannot say for sure. Unfortunately, I no longer work for that same company and do not have a good way to test it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants