mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
Check if string holds absolute file name before passing to FileName
See http://comments.gmane.org/gmane.editors.lyx.cvs/38213http://comments.gmane.org/gmane.editors.lyx.cvs/38213
This commit is contained in:
parent
7f0c44cae3
commit
44df37ab2a
@ -1572,10 +1572,12 @@ 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());
|
||||
bool const is_open = FileName::isAbsolute(fname)
|
||||
&& theBufferList().getBuffer(FileName(fname));
|
||||
if (d->views_.empty()
|
||||
|| (!lyxrc.open_buffers_in_tabs
|
||||
&& current_view_->documentBufferView() != 0
|
||||
&& !theBufferList().getBuffer(FileName(fname)))) {
|
||||
&& !is_open)) {
|
||||
// We want the ui session to be saved per document and not per
|
||||
// window number. The filename crc is a good enough identifier.
|
||||
boost::crc_32_type crc;
|
||||
|
Loading…
Reference in New Issue
Block a user