From fae970f4c2eb82cb99452ac69249ea69fcec9e38 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 20 May 2005 16:50:03 +0000 Subject: [PATCH] set tex2lyx master file path correctly for input files in a subdir git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9962 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/tex2lyx/ChangeLog | 4 ++++ src/tex2lyx/tex2lyx.C | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tex2lyx/ChangeLog b/src/tex2lyx/ChangeLog index 5d5633e1ee..dccc72ecf8 100644 --- a/src/tex2lyx/ChangeLog +++ b/src/tex2lyx/ChangeLog @@ -1,3 +1,7 @@ +2005-05-20 Georg Baum + + * tex2lyx.C (main): set correct masterFilePath for files like "subdir/file" + 2005-04-18 Georg Baum * text.C (parse_comment): Don't start a new paragraph for "%\n" diff --git a/src/tex2lyx/tex2lyx.C b/src/tex2lyx/tex2lyx.C index 67f8d30cf3..4fdba5a51f 100644 --- a/src/tex2lyx/tex2lyx.C +++ b/src/tex2lyx/tex2lyx.C @@ -54,6 +54,8 @@ using std::map; using lyx::support::isStrUnsignedInt; using lyx::support::ltrim; +using lyx::support::MakeAbsPath; +using lyx::support::OnlyPath; using lyx::support::rtrim; using lyx::support::IsFileReadable; @@ -414,10 +416,7 @@ int main(int argc, char * argv[]) return 2; } - if (lyx::support::AbsolutePath(argv[1])) - masterFilePath = lyx::support::OnlyPath(argv[1]); - else - masterFilePath = lyx::support::getcwd(); + masterFilePath = OnlyPath(MakeAbsPath(argv[1])); tex2lyx(is, cout); -- 2.39.2