Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 74b27aa

Browse files
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

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

Lines changed: 1 addition & 7 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /