X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FSession.cpp;h=9291ef1c2213bfcd974a4a992544446915bee8fe;hb=e01e14872d60935908ad42bc164bff1342277b22;hp=05f02230ebe40a179ef31a0dbd85e9a5a893f91f;hpb=7c392af6eab5e06a4836146859cbd9f2c3764420;p=lyx.git diff --git a/src/Session.cpp b/src/Session.cpp index 05f02230eb..9291ef1c22 100644 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -12,9 +12,10 @@ #include #include "Session.h" + #include "support/debug.h" -#include "support/Package.h" #include "support/filetools.h" +#include "support/Package.h" #include #include @@ -55,11 +56,11 @@ void LastFilesSection::read(istream & is) if (c == '[') break; getline(is, tmp); - if (tmp == "" || tmp[0] == '#' || tmp[0] == ' ' || !absolutePath(tmp)) + FileName const file(tmp); + if (tmp == "" || tmp[0] == '#' || tmp[0] == ' ' || !file.isAbsolute()) continue; // read lastfiles - FileName const file(tmp); if (file.exists() && !file.isDirectory() && lastfiles.size() < num_lastfiles) lastfiles.push_back(file); @@ -109,10 +110,10 @@ void LastOpenedSection::read(istream & is) if (c == '[') break; getline(is, tmp); - if (tmp == "" || tmp[0] == '#' || tmp[0] == ' ' || !absolutePath(tmp)) + FileName const file(tmp); + if (tmp == "" || tmp[0] == '#' || tmp[0] == ' ' || !file.isAbsolute()) continue; - FileName const file(tmp); if (file.exists() && !file.isDirectory()) lastopened.push_back(file); else @@ -163,9 +164,9 @@ void LastFilePosSection::read(istream & is) itmp >> filepos.pos; itmp.ignore(2); // ignore ", " getline(itmp, fname); - if (!absolutePath(fname)) - continue; FileName const file(fname); + if (!file.isAbsolute()) + continue; if (file.exists() && !file.isDirectory() && lastfilepos.size() < num_lastfilepos) lastfilepos[file] = filepos; @@ -240,9 +241,9 @@ void BookmarksSection::read(istream & is) itmp >> pos; itmp.ignore(2); // ignore ", " getline(itmp, fname); - if (!absolutePath(fname)) - continue; FileName const file(fname); + if (!file.isAbsolute()) + continue; // only load valid bookmarks if (file.exists() && !file.isDirectory() && idx <= max_bookmarks) bookmarks[idx] = Bookmark(file, pit, pos, 0, 0);