diff --git a/Fltk/fileDialogs.cpp b/Fltk/fileDialogs.cpp index 627493861c94453e5e61c462f27cd46e7b527c4a..a27c40be809001986b451df2679b00e3f3c49f09 100644 --- a/Fltk/fileDialogs.cpp +++ b/Fltk/fileDialogs.cpp @@ -99,8 +99,10 @@ int fileChooser(FILE_CHOOSER_TYPE type, const char *message, std::string thepath; if(fname) thepath = std::string(fname); - else - thepath = GModel::current()->getFileName(); + else{ + std::vector<std::string> tmp = SplitFileName(GModel::current()->getFileName()); + thepath = tmp[0] + tmp[1]; // i.e., without the extension! + } std::vector<std::string> split = SplitFileName(thepath); if(split[0].empty()) thepath = std::string("./") + thepath;