Skip to content

Commit 7a88c03

Browse files
author
Shahen Hovhannisyan
authored
fix(RNViewShotModule): FileNotFound exception
My previous commit didn't fixed issue with nested paths, so this commit fixes it.
1 parent 9d4a1ad commit 7a88c03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +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();
81+
file.getParentFile().mkdirs();
8282
file.createNewFile();
8383
}
8484
else {

0 commit comments

Comments
 (0)