Browse Source

fix(RNViewShotModule): FileNotFound exception

My previous commit didn't fixed issue with nested paths, so this commit fixes it.
Shahen Hovhannisyan 7 years ago
parent
commit
7a88c035d3

+ 1
- 1
android/src/main/java/fr/greweb/reactnativeviewshot/RNViewShotModule.java View File

@@ -78,7 +78,7 @@ public class RNViewShotModule extends ReactContextBaseJavaModule {
78 78
             if ("file".equals(result)) {
79 79
                 if (options.hasKey("path")) {
80 80
                     file = new File(options.getString("path"));
81
-                    file.mkdirs();
81
+                    file.getParentFile().mkdirs();
82 82
                     file.createNewFile();
83 83
                 }
84 84
                 else {