Skip to content

Commit 74b27aa

Browse files
committed
Remove error if the directory already exists
1 parent 3c9e91a commit 74b27aa

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Diff for: android/src/main/java/io/fullstack/firestack/FirestackStorage.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,7 @@ public void doInBackground(StreamDownloadTask.TaskSnapshot taskSnapshot, InputSt
116116
String pathMinusFileName = indexOfLastSlash>0 ? localFile.substring(0, indexOfLastSlash) + "/" : "/";
117117
String filename = indexOfLastSlash>0 ? localFile.substring(indexOfLastSlash+1) : localFile;
118118
File fileWithJustPath = new File(pathMinusFileName);
119-
if (!fileWithJustPath.mkdirs()) {
120-
Log.e(TAG, "Directory not created");
121-
WritableMap error = Arguments.createMap();
122-
error.putString("message", "Directory not created");
123-
callback.invoke(error);
124-
return;
125-
}
119+
fileWithJustPath.mkdirs();
126120
File fileWithFullPath = new File(pathMinusFileName, filename);
127121
FileOutputStream output = new FileOutputStream(fileWithFullPath);
128122
int bufferSize = 1024;

0 commit comments

Comments
 (0)