- lastopened.clear();
- FileNameList list;// = theApp()->fileNameListFromSession("last_opened");
- for (size_t i = 0; i != list.size(); ++i) {
- FileName const & file = list[i];
- if (!file.isAbsolute() || !file.exists() || file.isDirectory())
- LYXERR(Debug::INIT, "Warning: invalid last opened file: " << file);
- else
+ string tmp;
+ do {
+ char c = is.peek();
+ if (c == '[')
+ break;
+ getline(is, tmp);
+ FileName const file(tmp);
+ if (tmp == "" || tmp[0] == '#' || tmp[0] == ' ' || !file.isAbsolute())
+ continue;
+
+ if (file.exists() && !file.isDirectory())