Browse Source

Merge pull request #69 from shahen94/master

fix(RNViewShotModule): FileNotFound exception
Gaëtan Renaudeau 7 years ago
parent
commit
c421819913

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

78
             if ("file".equals(result)) {
78
             if ("file".equals(result)) {
79
                 if (options.hasKey("path")) {
79
                 if (options.hasKey("path")) {
80
                     file = new File(options.getString("path"));
80
                     file = new File(options.getString("path"));
81
-                    file.mkdirs();
81
+                    file.getParentFile().mkdirs();
82
                     file.createNewFile();
82
                     file.createNewFile();
83
                 }
83
                 }
84
                 else {
84
                 else {