Commit 3a052205 authored by libin's avatar libin

上传包的修改

parent 65362f81
...@@ -64,6 +64,13 @@ public class FileUploadServiceImpl implements FileUploadService { ...@@ -64,6 +64,13 @@ public class FileUploadServiceImpl implements FileUploadService {
String path=readZipFile(packFilePath); String path=readZipFile(packFilePath);
if (StringUtils.isNotBlank(path)){ if (StringUtils.isNotBlank(path)){
path=xx_url+"/"+prefix+"/"+path; path=xx_url+"/"+prefix+"/"+path;
if (path.contains(".apk")){
Runtime runtime = Runtime.getRuntime();
//删除包
runtime.exec("rm -rf "+uploadPath+"/xxfc.apk");
//复制包
runtime.exec("cp -f "+uploadPath+path+" "+uploadPath+"/xxfc.apk");
}
return ObjectRestResponse.succ(path); return ObjectRestResponse.succ(path);
}else { }else {
return ObjectRestResponse.createDefaultFail(); return ObjectRestResponse.createDefaultFail();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment