File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/mcp/java/net/minecraftforge/gradle/mcp/function Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,10 @@ public File execute(MCPEnvironment environment) throws Exception {
5959 // Check if file exists in local installer cache
6060 if (info .type .equals ("jar" ) && info .side .equals ("client" )) {
6161 File localPath = new File (Utils .getMCDir () + File .separator + "versions" + File .separator + info .version + File .separator + info .version + ".jar" );
62- if (HashUtil .sha1 (localPath ).equals (info .hash )) {
62+ if (localPath . exists () && HashUtil .sha1 (localPath ).equals (info .hash )) {
6363 FileUtils .copyFile (localPath , download );
64+ } else {
65+ FileUtils .copyURLToFile (new URL (info .url ), download );
6466 }
6567 } else {
6668 FileUtils .copyURLToFile (new URL (info .url ), download );
You can’t perform that action at this time.
0 commit comments