|
|
@@ -1,4 +1,4 @@
|
|
|
-package cn.reghao.autodop.dmaster.app.db.crud.config.build;
|
|
|
+package cn.reghao.autodop.dmaster.app.db.crud.config;
|
|
|
|
|
|
import cn.reghao.autodop.common.machine.disk.Disk;
|
|
|
import cn.reghao.jdkutil.result.Result;
|
|
|
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @author reghao
|
|
|
@@ -60,7 +61,7 @@ public class BuildDirCrudService {
|
|
|
// TODO 目录迁移时不能有应用处于构建过程中
|
|
|
BuildDir newBuildDir = BuildDirLocal.setBuildDir(newDirPath);
|
|
|
File file = new File(oldPackDir);
|
|
|
- if (file.list().length != 0) {
|
|
|
+ if (Objects.requireNonNull(file.list()).length != 0) {
|
|
|
try {
|
|
|
FileOps.copyDirContentToDir(oldPackDir, BuildDirLocal.packDir);
|
|
|
} catch (IOException e) {
|