- if (fs::exists(fname) && !fs::is_directory(fname) && bookmarks.size() < max_bookmarks)
- bookmarks.push_back(Bookmark(fname, id, pos));
- else
- lyxerr << "LyX: Warning: Ignore bookmark of file: " << fname << endl;
+ if (fs::exists(file.toFilesystemEncoding()) &&
+ !fs::is_directory(file.toFilesystemEncoding()) &&
+ bookmarks.size() < max_bookmarks)
+ bookmarks.push_back(Bookmark(file, pit, 0, pos));
+ else
+ lyxerr[Debug::INIT] << "LyX: Warning: Ignore bookmark of file: " << fname << endl;