提交 e249ba9a 编写于 作者: A anthony

6987233: FileDialog.getDirectory() should add a trainling slash when GTK FileDialog is used

Summary: Add the trailing slash if it's absent
Reviewed-by: art, dcherepanov
上级 e46ecca8
......@@ -64,7 +64,10 @@ class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer {
accessor.setFile(fd, null);
accessor.setFiles(fd, null, null);
} 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.setFiles(fd, directory, filenames);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册