From 3dec25e5a7ed032d8f9ae1c86bb1ba5896e3485d Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 29 Jan 2014 20:46:19 +0100 Subject: [PATCH] Revert "Return an error if file-open is called with a non-absolute path" Reverted because of http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg181795.html. This reverts commit 9c4461deea8eabb5bc025a08fa6ce11cb1c9e6fd. --- src/frontends/qt4/GuiApplication.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 916f0a4e14..22c129b350 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -1591,12 +1591,8 @@ 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)) { - 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 -- 2.39.2