#include "support/Package.h"
#include "support/filetools.h"
-#include <boost/filesystem/operations.hpp>
-
#include <fstream>
#include <sstream>
#include <algorithm>
using lyx::support::FileName;
using lyx::support::package;
-namespace fs = boost::filesystem;
-
using std::vector;
using std::getline;
using std::string;
getline(is, tmp);
if (tmp == "" || tmp[0] == '#' || tmp[0] == ' ' || !absolutePath(tmp))
continue;
-
+
// read lastfiles
FileName const file(tmp);
- if (fs::exists(file.toFilesystemEncoding()) &&
- !fs::is_directory(file.toFilesystemEncoding()) &&
- lastfiles.size() < num_lastfiles)
+ if (file.exists() && !file.isDirectory()
+ && lastfiles.size() < num_lastfiles)
lastfiles.push_back(file);
- else
+ else
LYXERR(Debug::INIT) << "LyX: Warning: Ignore last file: " << tmp << endl;
} while (is.good());
}
continue;
FileName const file(tmp);
- if (fs::exists(file.toFilesystemEncoding()) &&
- !fs::is_directory(file.toFilesystemEncoding()))
+ if (file.exists() && !file.isDirectory())
lastopened.push_back(file);
else
LYXERR(Debug::INIT) << "LyX: Warning: Ignore last opened file: " << tmp << endl;
if (!absolutePath(fname))
continue;
FileName const file(fname);
- if (fs::exists(file.toFilesystemEncoding()) &&
- !fs::is_directory(file.toFilesystemEncoding()) &&
- lastfilepos.size() < num_lastfilepos)
+ if (file.exists() && !file.isDirectory()
+ && lastfilepos.size() < num_lastfilepos)
lastfilepos[file] = boost::tie(pit, pos);
else
LYXERR(Debug::INIT) << "LyX: Warning: Ignore pos of last file: " << fname << endl;
continue;
FileName const file(fname);
// only load valid bookmarks
- if (fs::exists(file.toFilesystemEncoding()) &&
- !fs::is_directory(file.toFilesystemEncoding()) &&
- idx <= max_bookmarks)
+ if (file.exists() && !file.isDirectory() && idx <= max_bookmarks)
bookmarks[idx] = Bookmark(file, pit, pos, 0, 0);
else
LYXERR(Debug::INIT) << "LyX: Warning: Ignore bookmark of file: " << fname << endl;
value >> posx;
value >> posy;
toolbars.push_back(boost::make_tuple(key, ToolbarInfo(state, location, posx, posy)));
- } else
+ } else
LYXERR(Debug::INIT) << "LyX: Warning: Ignore toolbar info: " << tmp << endl;
} catch (...) {
LYXERR(Debug::INIT) << "LyX: Warning: unknown Toolbar info: " << tmp << endl;