From: Pavel Sanda Date: Mon, 8 Sep 2008 15:46:23 +0000 (+0000) Subject: Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5234 . X-Git-Tag: 1.6.10~3519 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e6a27a47246b23939268ed487d152414b4680f85;p=features.git Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5234 . git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26338 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 2314304167..9068c48f2a 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1323,6 +1323,12 @@ void GuiView::openDocument(string const & fname) if (!fullname.empty()) filename = fullname.absFilename(); + if (!fullname.onlyPath().isDirectory()) { + Alert::warning(_("Invalid filename"), + bformat(_("The directory in the given path\n%1$s\ndoes not exists."), + from_utf8(fullname.absFilename()))); + return; + } // if the file doesn't exist, let the user create one if (!fullname.exists()) { // the user specifically chose this name. Believe him.