]> git.lyx.org Git - features.git/commitdiff
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=5234 .
authorPavel Sanda <sanda@lyx.org>
Mon, 8 Sep 2008 15:46:23 +0000 (15:46 +0000)
committerPavel Sanda <sanda@lyx.org>
Mon, 8 Sep 2008 15:46:23 +0000 (15:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26338 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index 231430416798e41cb21ecd43a4dbe573adc72d16..9068c48f2a37e47d8f52a267911c90c395c804b2 100644 (file)
@@ -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.