Skip to content

Commit

Permalink
fix failed to build unique file crash
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Jul 25, 2023
1 parent 1040174 commit 56a715d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ public static Uri createNewMediaFile(FileDescription file, MediaType mt, ReactAp

Uri mediauri = getMediaUri(mt);

// Keeps a handle to the new file's URI in case we need to modify it later.
return resolver.insert(mediauri, fileDetails);
try {
// Keeps a handle to the new file's URI in case we need to modify it later.
return resolver.insert(mediauri, fileDetails);
} catch (Exception e) {
return null;
}
} else {
File f = new File(relativePath + file.getFullPath());
if (true) {
Expand Down

0 comments on commit 56a715d

Please sign in to comment.