Skip to content

Commit

Permalink
Minor fix for file test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lemon-King committed Oct 15, 2023
1 parent 30a31a9 commit e3f2537
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/lemon/hxdd/builder/PackageBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ public void Start() {

ExtractFilesFromGZDoom();
FixPatches();

DownloadSteamArtwork();
DownloadKoraxLocalization();

Expand Down Expand Up @@ -813,6 +814,10 @@ private void PostProcessImageData(String path, Color from, Color to) {
// fixes transparency
try {
File fileTarget = new File(path);
if (!fileTarget.exists()) {
System.out.printf("PackageBuilder.PostProcessImageData: Warning path %s not found!%n", fileTarget.getPath());
return;
}
BufferedImage source = ImageIO.read(fileTarget);

Image image = colorSwap(source, from, to);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/lemon/hxdd/shared/WADHash.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Pair Compute() {
System.out.println("WADHash: skipping, path is folder.");
return null;
}
InputStream in = new BufferedInputStream(new FileInputStream(file));
InputStream in = new BufferedInputStream(new FileInputStream(this.file));
MessageDigest digest = MessageDigest.getInstance("SHA-1");
DigestInputStream digestStream = new DigestInputStream(in, digest);
digestStream.readAllBytes();
Expand Down

0 comments on commit e3f2537

Please sign in to comment.