|
|
|
@ -231,13 +231,7 @@ public class UploadUtils { |
|
|
|
|
// fr.read(chunkCs);
|
|
|
|
|
Long chunks = chunks(root, UUID); |
|
|
|
|
list.setTotal(chunks); |
|
|
|
|
FilenameFilter filter = new FilenameFilter() { |
|
|
|
|
@Override |
|
|
|
|
public boolean accept(File file, String s) { |
|
|
|
|
return s.endsWith(".conf") && !s.contains("-"); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
String[] fileNames = root.list(filter); |
|
|
|
|
String[] fileNames = root.list((file, s) -> !s.endsWith(".conf")); |
|
|
|
|
if (fileNames == null) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
@ -247,7 +241,7 @@ public class UploadUtils { |
|
|
|
|
for (String fileName : fileNameList) { |
|
|
|
|
String prefix = fileName.split("\\.")[0]; |
|
|
|
|
ETag tag = new ETag(); |
|
|
|
|
tag.setPartSize(new File(root.getAbsolutePath(), fileName).getTotalSpace()); |
|
|
|
|
tag.setPartSize(new File(root.getAbsolutePath(), fileName).length()); |
|
|
|
|
tag.setPartNumber(Integer.parseInt(prefix)); |
|
|
|
|
eTags.add(tag); |
|
|
|
|
} |
|
|
|
|