mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-02 05:27:43 -05:00
Patch download to work with symlinks (#736)
* Fix Download to work with symlinks
- Create SymlinkWalker
* isPathSymbolic for whether any part of the path is symbolic, existing or not.
* getRealPath for obtaining absolute, real path.
- Change Download to use SymlinkWalker
- Add in a new test for testing with symlinks
* Refactor
Switch to using Guava method for creating directories
* Fix import
* Alter test and fix arguments
* Forgot a def
* Fix method argument
* Change argument to child file
* Bump
This commit is contained in:
committed by
GitHub
parent
ddf4605845
commit
03e1369adc
@@ -24,6 +24,8 @@
|
||||
|
||||
package net.fabricmc.loom.util.download;
|
||||
|
||||
import static com.google.common.io.Files.createParentDirs;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
@@ -160,7 +162,7 @@ public class Download {
|
||||
}
|
||||
|
||||
try {
|
||||
Files.createDirectories(output.getParent());
|
||||
createParentDirs(output.toFile());
|
||||
Files.deleteIfExists(output);
|
||||
} catch (IOException e) {
|
||||
throw error(e, "Failed to prepare path for download");
|
||||
|
||||
Reference in New Issue
Block a user