allen пре 8 месеци
родитељ
комит
6c07268399

+ 18 - 17
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataAugmentationServiceImpl.java

@@ -256,23 +256,24 @@ public class DataAugmentationServiceImpl extends BaseServiceImpl<DataAugmentatio
 
         System.out.println("inputPath:" + inputPath.toString());
         ZipUtils.unzip(resourcePath, inputPath.toString());
-        //获取inputPath的下一级目录
-        if (Files.exists(inputPath) && Files.isDirectory(inputPath)) {
-            try (DirectoryStream<Path> stream = Files.newDirectoryStream(inputPath)) {
-                // 遍历目录流以找到第一个子目录
-                for (Path entry : stream) {
-                    if (Files.isDirectory(entry)) {
-                        // 打印第一个子目录的名称,并跳出循环
-                        dataAugmentation.setInputPath(entry.toString());
-                        break;  // 只处理第一个子目录后退出
-                    }
-                }
-            } catch (IOException e) {
-                return CommonResult.fail(e.toString());
-            }
-        } else {
-            return CommonResult.fail("The provided path is not a valid directory.");
-        }
+//        //获取inputPath的下一级目录
+//        if (Files.exists(inputPath) && Files.isDirectory(inputPath)) {
+//            try (DirectoryStream<Path> stream = Files.newDirectoryStream(inputPath)) {
+//                // 遍历目录流以找到第一个子目录
+//                for (Path entry : stream) {
+//                    if (Files.isDirectory(entry)) {
+//                        // 打印第一个子目录的名称,并跳出循环
+//                        dataAugmentation.setInputPath(entry.toString());
+//                        break;  // 只处理第一个子目录后退出
+//                    }
+//                }
+//            } catch (IOException e) {
+//                return CommonResult.fail(e.toString());
+//            }
+//        } else {
+//            return CommonResult.fail("The provided path is not a valid directory.");
+//        }
+        dataAugmentation.setInputPath(inputPath.toString());
         dataAugmentation.setAlgorithmPath(logPath.toString());
         dataAugmentation.setOutputPath(outputPath.toString());
         dataAugmentation.setStartTime(new Date());