fix(gui): trim also leading spaces in paths from file dialog (#2244)

This commit is contained in:
Skylot
2024-08-10 19:24:05 +01:00
parent 015876b790
commit 8c6ec3bccc
@@ -348,11 +348,11 @@ public class FileUtils {
}
public static Path toPathWithTrim(File file) {
return Path.of(file.getPath().stripTrailing());
return toPathWithTrim(file.getPath());
}
public static Path toPathWithTrim(String file) {
return Path.of(file.stripTrailing());
return Path.of(file.trim());
}
public static List<Path> fileNamesToPaths(List<String> fileNames) {