Skip to content

Commit 4ee9326

Browse files
authored
Merge pull request #68 from shahen94/master
recursively create folders before creating file
2 parents 8cbe829 + 9d4a1ad commit 4ee9326

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

android/src/main/java/fr/greweb/reactnativeviewshot/RNViewShotModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public void takeSnapshot(int tag, ReadableMap options, Promise promise) {
7878
if ("file".equals(result)) {
7979
if (options.hasKey("path")) {
8080
file = new File(options.getString("path"));
81+
file.mkdirs();
8182
file.createNewFile();
8283
}
8384
else {

0 commit comments

Comments
 (0)