Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Commit

Permalink
Fallback to default storage dir when the currentPath doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
floens committed Jul 23, 2014
1 parent b3d8ab7 commit 8ebdcc1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import android.app.DialogFragment;
import android.os.Bundle;
import android.os.Environment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -135,6 +136,10 @@ public void onClick(View v) {

listView.setAdapter(adapter);

if (currentPath == null || !currentPath.exists()) {
currentPath = Environment.getExternalStorageDirectory();
}

moveTo(currentPath);

return container;
Expand Down

0 comments on commit 8ebdcc1

Please sign in to comment.