rework downloader new array
This commit is contained in:
parent
1d9b85c4b7
commit
9e542ab541
1 changed files with 2 additions and 2 deletions
|
@ -175,7 +175,7 @@ public class DownloadWorker extends Worker {
|
||||||
return Result.failure(output.build());
|
return Result.failure(output.build());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (downloadAll != VALUE_SEGMENT_ALL) {
|
if (!versionChanged && downloadAll != VALUE_SEGMENT_ALL) {
|
||||||
List<String> tmpSegementNames = new ArrayList<>();
|
List<String> tmpSegementNames = new ArrayList<>();
|
||||||
File segmentFolder = new File(baseDir, SEGMENTS_DIR);
|
File segmentFolder = new File(baseDir, SEGMENTS_DIR);
|
||||||
File[] files = segmentFolder.listFiles(new FileFilter() {
|
File[] files = segmentFolder.listFiles(new FileFilter() {
|
||||||
|
@ -196,7 +196,7 @@ public class DownloadWorker extends Worker {
|
||||||
return Result.failure(output.build());
|
return Result.failure(output.build());
|
||||||
}
|
}
|
||||||
if (downloadAll == VALUE_SEGMENT_DIFFS) {
|
if (downloadAll == VALUE_SEGMENT_DIFFS) {
|
||||||
tmpSegementNames.toArray(segmentNames);
|
segmentNames = tmpSegementNames.toArray(new String[0]);
|
||||||
} else if (downloadAll == VALUE_SEGMENT_DROPDIFFS) {
|
} else if (downloadAll == VALUE_SEGMENT_DROPDIFFS) {
|
||||||
for (String segmentName : tmpSegementNames) {
|
for (String segmentName : tmpSegementNames) {
|
||||||
File segmentFile = new File(baseDir, SEGMENTS_DIR + segmentName + SEGMENT_SUFFIX);
|
File segmentFile = new File(baseDir, SEGMENTS_DIR + segmentName + SEGMENT_SUFFIX);
|
||||||
|
|
Loading…
Reference in a new issue