Browse Source

Merge pull request #68 from shahen94/master

recursively create folders before creating file
Gaëtan Renaudeau 7 years ago
parent
commit
4ee9326383

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

@@ -78,6 +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 82
                     file.createNewFile();
82 83
                 }
83 84
                 else {