# HG changeset patch # User John Donoghue # Date 1390951077 18000 # Node ID 6ebd37faae5f3d701f20acc3fc4d948c6a347f14 # Parent 2ea741d2255446ad0292fb32e3042a178b99895b Add path separator to end of uigetfile path (Bug #41367) * libgui/src/dialog.cc (FileDialog::accept): Add / to pathname if showing files dialog. Convert path to native separators. diff -r 2ea741d22554 -r 6ebd37faae5f libgui/src/dialog.cc --- a/libgui/src/dialog.cc Sun Jan 26 12:55:21 2014 +0100 +++ b/libgui/src/dialog.cc Tue Jan 28 18:17:57 2014 -0500 @@ -491,8 +491,14 @@ for (int i = 0; i < string_result.size (); i++) string_result[i] = QFileInfo (string_result[i]).fileName (); + path = directory ().absolutePath (); - path = directory ().absolutePath (); + // if not showing only dirs, add end slash for the path component + if (testOption (QFileDialog::ShowDirsOnly) == false) + path = path + "/"; + + // convert to native slashes + path = QDir::toNativeSeparators (path); QStringList name_filters = nameFilters (); idx = name_filters.indexOf (selectedNameFilter ()) + 1;