Skip to content

Commit

Permalink
skip direcotries in modfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwav committed Jun 27, 2024
1 parent 5f67039 commit ac96c3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/java/de/torui/coflsky/WSCommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ private static void handleProxyRequest(ProxyRequest[] request) {
public static void cacheMods() {
File modFolder = new File(Minecraft.getMinecraft().mcDataDir, "mods");
for (File mods : modFolder.listFiles()) {
if(mods.isDirectory())
continue;
modListData.addFilename(mods.getName());
try {
modListData.addFileHashes(FileUtils.getSha256Checksum(mods));
Expand Down
1 change: 0 additions & 1 deletion src/main/java/de/torui/coflsky/utils/FileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static String getSha256Checksum(File file) throws Exception {
for (int i=0; i < b.length; i++) {
result += Integer.toString( ( b[i] & 0xff ) + 0x100, 16).substring( 1 );
}
System.out.println("MD5: "+result);
return result;
}

Expand Down

0 comments on commit ac96c3a

Please sign in to comment.