xiewj 1 年之前
父节点
当前提交
dd651b406b
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      src/main/java/com/fdkankan/download/service/impl/LaserService.java

+ 4 - 4
src/main/java/com/fdkankan/download/service/impl/LaserService.java

@@ -106,8 +106,8 @@ public class LaserService  implements ILaserService {
                                 }
                                 }
                             }else{
                             }else{
                                 String srcPath=datum.getKey();
                                 String srcPath=datum.getKey();
-                                if (!srcPath.startsWith("/")){
-                                    srcPath="/"+srcPath;
+                                if("/".equals(datum.getKey().substring(0,1))){
+                                    srcPath = srcPath.substring(1);
                                 }
                                 }
                                 fYunFileService.downloadFileByCommand(bucket,sourceLocal+datum.getPath(),srcPath);
                                 fYunFileService.downloadFileByCommand(bucket,sourceLocal+datum.getPath(),srcPath);
                             }
                             }
@@ -136,8 +136,8 @@ public class LaserService  implements ILaserService {
                                 }
                                 }
                             }else{
                             }else{
                                 String srcPath=datum.getKey();
                                 String srcPath=datum.getKey();
-                                if (!srcPath.startsWith("/")){
-                                    srcPath="/"+srcPath;
+                                if("/".equals(datum.getKey().substring(0,1))){
+                                    srcPath = srcPath.substring(1);
                                 }
                                 }
                                 fYunFileService.downloadFileByCommand(bucket,sourceLocal+datum.getPath(),srcPath);
                                 fYunFileService.downloadFileByCommand(bucket,sourceLocal+datum.getPath(),srcPath);
                                 File[] deptLs = FileUtil.ls(sourceLocal+datum.getPath());
                                 File[] deptLs = FileUtil.ls(sourceLocal+datum.getPath());