|
@@ -195,8 +195,7 @@ public class ThreadService {
|
|
|
List<String> ossGlbPaths = new ArrayList<>();
|
|
|
File localFile = new File(objPath);
|
|
|
Long size = 0L;
|
|
|
- this.toGlB(localFile, localGlbPaths,size);
|
|
|
- String sizeStr = FileWriterUtil.setFileSize(size);
|
|
|
+ String sizeStr = FileWriterUtil.setFileSize(this.toGlB(localFile, localGlbPaths,size));
|
|
|
if(!localGlbPaths.isEmpty()){
|
|
|
for (String localGlbPath : localGlbPaths) {
|
|
|
String ossPath = localGlbPath.replace("/mnt/","");
|
|
@@ -218,11 +217,11 @@ public class ThreadService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private void toGlB(File localFile, List<String> localGlbPath,Long size) {
|
|
|
+ private Long toGlB(File localFile, List<String> localGlbPath,Long size) {
|
|
|
File[] files = localFile.listFiles();
|
|
|
for (File file : files) {
|
|
|
if(file.isDirectory()){
|
|
|
- toGlB(file,localGlbPath,size);
|
|
|
+ return toGlB(file,localGlbPath,size);
|
|
|
}
|
|
|
if(file.getPath().contains("lod_") ){
|
|
|
if(file.getPath().contains("lod_0") && file.getName().contains(".obj")){
|
|
@@ -239,6 +238,7 @@ public class ThreadService {
|
|
|
localGlbPath.add(glbPath);
|
|
|
}
|
|
|
}
|
|
|
+ return size;
|
|
|
}
|
|
|
|
|
|
}
|