fix: dev plugin save creating dir

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

View File

@@ -99,7 +99,9 @@ public class DevPluginResponseHandler implements Handler {
if (!name.endsWith(".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);
}
}