|
@@ -12,6 +12,7 @@ import sys.sc.opplugin.utils.DatFileCreatUtils;
|
|
|
import sys.sc.opplugin.utils.SftpClient;
|
|
|
|
|
|
import java.io.File;
|
|
|
+import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -59,10 +60,19 @@ public class CreatDatPlugin extends AbstractListPlugin {
|
|
|
String filedir="/home/kingdee/cosmic/nginx-appstatic/store/appstatic/";
|
|
|
//生成文件的路径
|
|
|
String filePath=filedir+filename;
|
|
|
- File dir=new File(filedir);
|
|
|
+ File dir=new File(filePath);
|
|
|
//不存在则创建文件夹
|
|
|
if (!dir.exists()) {
|
|
|
- dir.mkdirs();
|
|
|
+ File parentDir = dir.getParentFile();
|
|
|
+ if (parentDir != null && !parentDir.exists()) {
|
|
|
+ parentDir.mkdirs();
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ dir.createNewFile();
|
|
|
+ } catch (IOException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ this.getView().showMessage("创建成功"+filePath);
|
|
|
}
|
|
|
//分割符号
|
|
|
String spiltsign=jkdataDy.getString("nckd_split");
|