6987233: FileDialog.getDirectory() should add a trainling slash when GTK FileDialog is used
Add the trailing slash if it's absent Reviewed-by: art, dcherepanov
This commit is contained in:
parent
fbb62aa566
commit
afc679f6ad
@ -64,7 +64,10 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
|
|||||||
accessor.setFile(fd, null);
|
accessor.setFile(fd, null);
|
||||||
accessor.setFiles(fd, null, null);
|
accessor.setFiles(fd, null, null);
|
||||||
} else {
|
} else {
|
||||||
accessor.setDirectory(fd, directory);
|
// Fix 6987233: add the trailing slash if it's absent
|
||||||
|
accessor.setDirectory(fd, directory +
|
||||||
|
(directory.endsWith(File.separator) ?
|
||||||
|
"" : File.separator));
|
||||||
accessor.setFile(fd, filenames[0]);
|
accessor.setFile(fd, filenames[0]);
|
||||||
accessor.setFiles(fd, directory, filenames);
|
accessor.setFiles(fd, directory, filenames);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user