summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/CursesDialog/cmCursesPathWidget.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesPathWidget.cxx b/Source/CursesDialog/cmCursesPathWidget.cxx
index 36ef5b9..5042838 100644
--- a/Source/CursesDialog/cmCursesPathWidget.cxx
+++ b/Source/CursesDialog/cmCursesPathWidget.cxx
@@ -75,6 +75,11 @@ void cmCursesPathWidget::OnTab(cmCursesMainForm* fm, WINDOW* w)
cstr = cstr.substr(0, cstr.size()-1);
}
+ if ( cmSystemTools::FileIsDirectory(cstr.c_str()) )
+ {
+ cstr += "/";
+ }
+
this->SetString(cstr.c_str());
touchwin(w);
wrefresh(w);