From e6a27a47246b23939268ed487d152414b4680f85 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Mon, 8 Sep 2008 15:46:23 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.39.5