Skip to content

Commit 7ce61bd

Browse files
committed
Remove error if the directory already exists
1 parent 44067f6 commit 7ce61bd

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

android/src/main/java/io/fullstack/firestack/storage/FirestackStorage.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,7 @@ public void doInBackground(StreamDownloadTask.TaskSnapshot taskSnapshot, InputSt
114114
String pathMinusFileName = indexOfLastSlash>0 ? localFile.substring(0, indexOfLastSlash) + "/" : "/";
115115
String filename = indexOfLastSlash>0 ? localFile.substring(indexOfLastSlash+1) : localFile;
116116
File fileWithJustPath = new File(pathMinusFileName);
117-
if (!fileWithJustPath.mkdirs()) {
118-
Log.e(TAG, "Directory not created");
119-
WritableMap error = Arguments.createMap();
120-
error.putString("message", "Directory not created");
121-
callback.invoke(error);
122-
return;
123-
}
117+
fileWithJustPath.mkdirs();
124118
File fileWithFullPath = new File(pathMinusFileName, filename);
125119
FileOutputStream output = new FileOutputStream(fileWithFullPath);
126120
int bufferSize = 1024;

0 commit comments

Comments
 (0)