mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix chosen path composition on Windows
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
package com.intellij.openapi.fileChooser;
|
||||
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.StringBuilderSpinAllocator;
|
||||
@@ -58,8 +59,11 @@ public class FileElement {
|
||||
FileElement element = this;
|
||||
while (element != null) {
|
||||
sb.insert(0, element.myName);
|
||||
if (element.myParent == null && SystemInfo.isWindows) {
|
||||
sb.insert(element.myName.length(), File.separator);
|
||||
}
|
||||
element = element.myParent;
|
||||
if (element != null && element.myParent != null /*&& !element.myName.endsWith(File.separator)*/) {
|
||||
if (element != null && element.myParent != null) {
|
||||
sb.insert(0, File.separator);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user