]> git.lyx.org Git - features.git/commitdiff
* src/LaTeX.C
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 20 Feb 2007 06:55:25 +0000 (06:55 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 20 Feb 2007 06:55:25 +0000 (06:55 +0000)
-  (deplog): don't check strings longer than MAX_PATH,
    preventing boost exception.
- (handleFoundFile): don't insert directories in DepTable

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17267 a592a061-630c-0410-9148-cb99ea01b6c8

src/LaTeX.C

index 5998c5acee65ffbcc420006fdece22231b653f0d..603d51030a3026855584340b65f8e32b9dccf5ff 100644 (file)
@@ -788,7 +788,8 @@ bool handleFoundFile(string const & ff, DepTable & head)
 
        // (2) foundfile is in the tmpdir
        //     insert it into head
-       if (fs::exists(absname.toFilesystemEncoding())) {
+       if (fs::exists(absname.toFilesystemEncoding())&&
+           !fs::is_directory(absname.toFilesystemEncoding())) {
                static regex unwanted("^.*\\.(aux|log|dvi|bbl|ind|glo)$");
                if (regex_match(onlyfile, unwanted)) {
                        lyxerr[Debug::DEPEND]
@@ -908,6 +909,12 @@ void LaTeX::deplog(DepTable & head)
                if (!lastline.empty())
                        // probably a continued filename from last line
                        token = lastline + token;
+               if (token.length() > 255) {
+                       // string too long. Cut off.
+                       int r = token.length() - 250;
+                       string ntoken = token.substr(r, token.length());
+                       token = ntoken;
+               }
 
                smatch sub;