未验证 提交 659bbbf4 编写于 作者: S Skylot

fix: correct usage of `Path.getParent()`

上级 427e2ddd
......@@ -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());
}
}
......
......@@ -451,7 +451,7 @@ public class MainWindow extends JFrame {
update();
restoreOpenTabs();
runInitialBackgroundJobs();
BreakpointManager.init(paths.get(0).getParent());
BreakpointManager.init(paths.get(0).toAbsolutePath().getParent());
}
private void addTreeCustomNodes() {
......@@ -517,7 +517,7 @@ public class MainWindow extends JFrame {
if (projectPath == null) {
pathString = "";
} else {
pathString = " [" + projectPath.getParent().toAbsolutePath() + ']';
pathString = " [" + projectPath.toAbsolutePath().getParent() + ']';
}
setTitle((project.isSaved() ? "" : '*')
+ project.getName() + pathString + " - " + DEFAULT_TITLE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册