fix: dev plugin save creating dir

This commit is contained in:
hyb1996 committed 2018-09-29 11:13:15 +08:00
1 parent c8d2a6e7a2
commit 2259020403
2 files changed
+3 -1

No files matched your search

Binary file not shown.
@@ -99,7 +99,9 @@ public class DevPluginResponseHandler implements Handler {
if (!name.endsWith(".js")) { if (!name.endsWith(".js")) {
name = name + ".js"; name = name + ".js";
} }
PFiles.write(new File(Pref.getScriptDirPath(), name), script); File file = new File(Pref.getScriptDirPath(), name);
PFiles.ensureDir(file.getPath());
PFiles.write(file, script);
GlobalAppContext.toast(R.string.text_script_save_successfully); GlobalAppContext.toast(R.string.text_script_save_successfully);
} }
} }