Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
frombetelgeuse committed Dec 7, 2020
1 parent 38194a7 commit bc05331
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,11 @@ public void act(Outputter out, PropertiesWithFiles pb, ProjectClient client) {

LanguageMapping serverLanguageMapping = project.getLanguageMapping();

List<Language> forLanguages = language
.map(Collections::singletonList)
.orElse(project.getProjectLanguages(true));

Map<Pair<File, List<String>>, List<Map<String, String>>> fileBeansWithDownloadedFiles = new TreeMap<>();
List<File> tempDirs = new ArrayList<>();
try {
if (pseudo) {
List<Language> forLanguages = project.getSupportedLanguages();
if (!plainView) {
out.println(OK.withIcon(RESOURCE_BUNDLE.getString("message.build_archive_pseudo")));
}
Expand All @@ -129,6 +126,9 @@ public void act(Outputter out, PropertiesWithFiles pb, ProjectClient client) {
}
tempDirs.add(downloadedFiles.getLeft());
} else {
List<Language> forLanguages = language
.map(Collections::singletonList)
.orElse(project.getProjectLanguages(true));
if (!plainView) {
out.println((languageId != null)
? OK.withIcon(String.format(RESOURCE_BUNDLE.getString("message.build_language_archive"), languageId))
Expand Down Expand Up @@ -192,7 +192,6 @@ public void act(Outputter out, PropertiesWithFiles pb, ProjectClient client) {
Map<String, List<String>> totalOmittedFiles = null;
List<String> totalOmittedFilesNoSources = new ArrayList<>();

// for (Pair<Map<String, String>, Pair<File, List<String>>> data : fileBeansWithDownloadedFiles) {
for (Pair<File, List<String>> key : fileBeansWithDownloadedFilesNoRepetitions.keySet()) {
List<Pair<String, String>> filesWithMapping = fileBeansWithDownloadedFilesNoRepetitions.get(key);
File tempDir = key.getKey();
Expand Down Expand Up @@ -337,12 +336,13 @@ private Pair<Map<File, File>, List<String>> sortFiles(
String baseTempDir
) {
Map<File, File> fileMapping = filesWithMapping.stream()
.filter(pair -> downloadedFiles.contains(pair.getLeft()))
.collect(Collectors.toMap(
pair -> new File(Utils.joinPaths(baseTempDir, pair.getLeft())),
pair -> new File(Utils.joinPaths(basePath, pair.getRight()))
));
List<String> filesWithMappingFrom = filesWithMapping.stream()
.map(Pair::getRight)
.map(Pair::getLeft)
.collect(Collectors.toList());
List<String> omittedFiles = downloadedFiles
.stream()
Expand Down

0 comments on commit bc05331

Please sign in to comment.