Skip to content

Commit

Permalink
fixup! add support for non-document.ui import
Browse files Browse the repository at this point in the history
Signed-off-by: x0b <x0b@users.noreply.github.com>
  • Loading branch information
x0b committed Aug 25, 2019
1 parent be74d75 commit f0e9599
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/src/main/java/ca/pkay/rcloneexplorer/MainActivity.java
Expand Up @@ -295,8 +295,11 @@ public boolean onNavigationItemSelected(@NonNull MenuItem item) {
startRemotesFragment();
break;
case R.id.nav_import:
Uri configUri;
if (rclone.isConfigFileCreated()) {
warnUserAboutOverwritingConfiguration();
} else if(null != (configUri = rclone.searchExternalConfig())) {
askUseExternalConfig(configUri);
} else {
importConfigFile();
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java
Expand Up @@ -808,7 +808,7 @@ public boolean isConfigFileCreated() {
return file.exists();
}

// on all devices, look under ./Android/ca.pkay.rcloneexplorer/files/rclone.config
// on all devices, look under ./Android/data/ca.pkay.rcloneexplorer/files/rclone.conf
public Uri searchExternalConfig(){
File[] extDir = context.getExternalFilesDirs(null);
for(File dir : extDir){
Expand Down

0 comments on commit f0e9599

Please sign in to comment.