Skip to content

Commit

Permalink
fixed directory created crash
Browse files Browse the repository at this point in the history
  • Loading branch information
vauvenal5 committed Feb 22, 2013
1 parent 98196a2 commit 2f29a92
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/org/sparkleshare/android/utils/ExternalDirectory.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ public static void createDirectory(String path){
path = ExternalDirectory.getExternalRootDirectory() + "/" + path;
File extDir = new File(path);

if(!extDir.mkdirs()){
throw new RuntimeException("Couldn't create external directory");
if(!extDir.exists()){
if(!extDir.mkdirs()){
throw new RuntimeException("Couldn't create external directory");
}
}
}

Expand Down

0 comments on commit 2f29a92

Please sign in to comment.