From c9db26c827e9e46009e9b0dd35a89ddb435f58c8 Mon Sep 17 00:00:00 2001 From: Dekel Tsur Date: Tue, 3 Sep 2002 16:13:35 +0000 Subject: [PATCH] Look for lyx2lyx in LYXDIR/lyx2lyx/ git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5196 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 4 ++++ src/buffer.C | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 983b84eede..761f4758e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2002-08-29 Dekel Tsur + + * buffer.C (readFile): Look for lyx2lyx in LYXDIR/lyx2lyx/ + 2002-09-03 Angus Leeming * BufferView_pimpl.h: qualified name is not allowed in member diff --git a/src/buffer.C b/src/buffer.C index 2a3ebc753a..78011ecda7 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -1171,7 +1171,15 @@ bool Buffer::readFile(LyXLex & lex, Paragraph * par) "Use LyX 0.10.x to read this!")); return false; } else { - string const command = "lyx2lyx " + string command = + LibFileSearch("lyx2lyx", "lyx2lyx"); + if (command.empty()) { + Alert::alert(_("ERROR!"), + _("Can't find conversion script.")); + return false; + } + command += " -t" + +tostr(LYX_FORMAT)+" " + QuoteName(filename_); cmd_ret const ret = RunCommand(command); if (ret.first) { -- 2.39.2