]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: a method to fix #7897
authorUwe Stöhr <uwestoehr@web.de>
Wed, 7 Dec 2011 22:48:44 +0000 (22:48 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Wed, 7 Dec 2011 22:48:44 +0000 (22:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40431 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/text.cpp

index 1cdc27e7413c89a6e41e91e836676b51194da7c5..ce7cf04a280d0c7ecc181df4938c6a2cd2fb52e4 100644 (file)
@@ -2343,9 +2343,11 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                                string const path = getMasterFilePath();
                                                // We want to preserve relative / absolute filenames,
                                                // therefore path is only used for testing
+                                               // The file extension is in every case ".tex".
+                                               // So we need to remove this extension and check for
+                                               // the original one.
+                                               name.erase(name.length() - 4, name.length());
                                                if (!makeAbsPath(name, path).exists()) {
-                                                       // The file extension is probably missing.
-                                                       // Now try to find it out.
                                                        char const * const Gnumeric_formats[] = {"gnumeric"
                                                                "ods", "xls", 0};
                                                        string const Gnumeric_name =