Commit 546f411e authored by libin's avatar libin

上传包的修改

parent c3671e40
...@@ -64,12 +64,16 @@ public class FileUploadServiceImpl implements FileUploadService { ...@@ -64,12 +64,16 @@ 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")){ log.info("文件名:{}",path);
Runtime runtime = Runtime.getRuntime(); if (path.contains(".apk")){
//删除包 Runtime runtime = Runtime.getRuntime();
runtime.exec("rm -rf "+uploadPath+"/xxfc.apk"); log.info("执行删除xxfc.apk");
//复制包 //删除包
runtime.exec("cp -f "+uploadPath+path+" "+uploadPath+"/xxfc.apk"); runtime.exec("rm -rf "+uploadPath+"/xxfc.apk");
log.info("执行复制上传包为xxfc.apk");
//复制包
runtime.exec("cp -f "+uploadPath+path+" "+uploadPath+"/xxfc.apk");
} }
return ObjectRestResponse.succ(path); return ObjectRestResponse.succ(path);
}else { }else {
......
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