mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-11 21:57:35 +00:00
fix windows path handling
This commit is contained in:
1 file changed
+9
-1
+9
-1
@@ -45,10 +45,12 @@ import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
@@ -276,7 +278,13 @@ public class DependencyLoaderImpl {
|
||||
LOG.error("Failed to open jar file {}", source.getPath());
|
||||
}
|
||||
} else {
|
||||
val dir = Paths.get(fileName);
|
||||
Path dir;
|
||||
try {
|
||||
dir = Paths.get(source.toURI());
|
||||
} catch (URISyntaxException e) {
|
||||
LOG.error("Could not scan URL " + source + " for dependencies", e);
|
||||
return false;
|
||||
}
|
||||
if (!Files.exists(dir) || !Files.isDirectory(dir)) {
|
||||
LOG.warn("Skipping non-directory, nor jar source: {}", source);
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user