diff options
author | Scott Jackson <daneren2005@gmail.com> | 2015-04-20 17:20:30 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2015-04-20 17:20:30 -0700 |
commit | a5b94caf4d122fcd84277f0a46bb28481809456c (patch) | |
tree | 6f8db4a0447b1b4415fed9596f48ddf85f643b51 /src/github/daneren2005 | |
parent | 7d5c6f9abfc97f37728482091a5fbab5b822b0f7 (diff) | |
download | dsub-a5b94caf4d122fcd84277f0a46bb28481809456c.tar.gz dsub-a5b94caf4d122fcd84277f0a46bb28481809456c.tar.bz2 dsub-a5b94caf4d122fcd84277f0a46bb28481809456c.zip |
Fix cache location not being initialized with non-null value
Diffstat (limited to 'src/github/daneren2005')
-rw-r--r-- | src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java index 21ed9893..330f91bb 100644 --- a/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java +++ b/src/github/daneren2005/dsub/activity/SubsonicFragmentActivity.java @@ -541,7 +541,8 @@ public class SubsonicFragmentActivity extends SubsonicActivity { private boolean resetCacheLocation(SharedPreferences prefs) {
String newDirectory = FileUtil.getDefaultMusicDirectory(this).getPath();
- if(newDirectory == null || newDirectory.equals(prefs.getString(Constants.PREFERENCES_KEY_CACHE_LOCATION, newDirectory))) {
+ String oldDirectory = prefs.getString(Constants.PREFERENCES_KEY_CACHE_LOCATION, null);
+ if(newDirectory == null || (oldDirectory != null && newDirectory.equals(oldDirectory))) {
return false;
} else {
SharedPreferences.Editor editor = prefs.edit();
|