fix: correct usage of Path.getParent()
This commit is contained in:
@@ -58,7 +58,7 @@ public class DeobfPresets {
|
||||
if (inputFiles.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
Path inputFilePath = inputFiles.get(0).getAbsoluteFile().toPath();
|
||||
Path inputFilePath = inputFiles.get(0).toPath().toAbsolutePath();
|
||||
String baseName = FileUtils.getPathBaseName(inputFilePath);
|
||||
return inputFilePath.getParent().resolve(baseName + ".jobf");
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class FileUtils {
|
||||
|
||||
public static void makeDirsForFile(Path path) {
|
||||
if (path != null) {
|
||||
makeDirs(path.getParent().toFile());
|
||||
makeDirs(path.toAbsolutePath().getParent().toFile());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user