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
This commit is contained in:
Georg Baum 2005-05-20 16:50:03 +00:00
parent 0f52688b3a
commit fae970f4c2
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2005-05-20 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* tex2lyx.C (main): set correct masterFilePath for files like "subdir/file"
2005-04-18 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* text.C (parse_comment): Don't start a new paragraph for "%\n"

View File

@ -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);