1
0
chenendian 2 месяцев назад
Родитель
Сommit
00ec41a10b

+ 4 - 1
siwei-modules/siwei-apply/src/main/java/com/siwei/apply/service/cadastre/impl/CadastreManageServiceImpl.java

@@ -231,7 +231,10 @@ public class CadastreManageServiceImpl implements CadastreManageService {
                         theFileName =   innerExtractFileName;
                         theFileName =   innerExtractFileName;
                     }else {
                     }else {
                         //如果当前压缩文件最终一级则
                         //如果当前压缩文件最终一级则
-                        unZipPath = unZipPath.replace("/"+theFileName, "");
+                        unZipPath = unZipPath.replace(theFileName, "");
+                        if(StringUtils.isNotBlank(unZipPath) && (unZipPath.endsWith("/")||unZipPath.endsWith("\\"))){
+                            unZipPath = unZipPath.substring(0, unZipPath.length() - 1);
+                        }
                     }
                     }
 
 
                     CadastreFile cadastreFile = new CadastreFile();
                     CadastreFile cadastreFile = new CadastreFile();