commit a4d881c58e7ba0f1ee703ac067b5105a26b513e2
Author: Vincent van Ravesteijn <[email protected]>
Date:   Tue Dec 3 06:36:16 2013 +0100

    Return an error on file-open only when a filename is given
    
    Fixes: 9c4461de

diff --git a/src/frontends/qt4/GuiApplication.cpp 
b/src/frontends/qt4/GuiApplication.cpp
index 6d70345..1b58e9e 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -1572,12 +1572,13 @@ void GuiApplication::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
                validateCurrentView();
                // FIXME: create a new method shared with LFUN_HELP_OPEN.
                string const fname = to_utf8(cmd.argument());
-               if (!FileName::isAbsolute(fname)) {
+               if (!fname.empty() && !FileName::isAbsolute(fname)) {
                        dr.setError(true);
                        dr.setMessage(_("Absolute filename expected."));
                        break;
                }               
-               bool const is_open = theBufferList().getBuffer(FileName(fname));
+               bool const is_open = FileName::isAbsolute(fname) 
+                       && theBufferList().getBuffer(FileName(fname));
                if (d->views_.empty()
                    || (!lyxrc.open_buffers_in_tabs
                        && current_view_->documentBufferView() != 0

Reply via email to