mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Some boost::filesystem fixes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9564 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ab07b788e3
commit
807a279bc4
@ -1,3 +1,8 @@
|
||||
2005-02-01 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lyx_main.C (init, queryUserLyXDir): use fs::exists() before
|
||||
calling fs::is_directory().
|
||||
|
||||
2005-01-31 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lyx_main.C (priv_exec): specify explicitly the relative location
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-02-01 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FormFiledialog.C (Reread): use fs::exists() before
|
||||
calling fs::is_directory().
|
||||
|
||||
2005-01-31 Lars Gullik Bjonnes <larsbj@gullik.net>
|
||||
|
||||
* xforms_helpers.C: rewrite to use boost.filesystem
|
||||
|
@ -184,7 +184,7 @@ void FileDialog::Private::Reread()
|
||||
if (!mask_.empty() && mask_[0] != '.' && fname[0] == '.')
|
||||
continue;
|
||||
|
||||
bool const isDir = fs::is_directory(*beg);
|
||||
bool const isDir = fs::exists(*beg) && fs::is_directory(*beg);
|
||||
|
||||
// filters files according to pattern and type
|
||||
typedef vector<string>::const_iterator viterator;
|
||||
|
@ -484,7 +484,8 @@ void LyX::init(bool gui)
|
||||
if (reconfigure)
|
||||
reconfigureUserLyXDir();
|
||||
|
||||
if (fs::is_directory(lyxrc.document_path))
|
||||
if (fs::exists(lyxrc.document_path) &&
|
||||
fs::is_directory(lyxrc.document_path))
|
||||
package().document_dir() = lyxrc.document_path;
|
||||
|
||||
package().temp_dir() = createLyXTmpDir(lyxrc.tempdir_path);
|
||||
@ -612,7 +613,8 @@ bool LyX::queryUserLyXDir(bool explicit_userdir)
|
||||
bool reconfigure = false;
|
||||
|
||||
// Does user directory exist?
|
||||
if (fs::is_directory(package().user_support())) {
|
||||
if (fs::exists(package().user_support()) &&
|
||||
fs::is_directory(package().user_support())) {
|
||||
first_start = false;
|
||||
string const configure_script =
|
||||
AddName(package().system_support(), "configure");
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-02-01 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* fs_extras.C: #include <windows.h>
|
||||
|
||||
2005-01-31 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* package.[Ch] (init_package, c-tor): define and use an enum to
|
||||
|
@ -106,7 +106,6 @@ string const MakeLatexName(string const & file)
|
||||
}
|
||||
|
||||
|
||||
// Substitutes spaces with underscores in filename (and path)
|
||||
string const QuoteName(string const & name)
|
||||
{
|
||||
return (os::shell() == os::UNIX) ?
|
||||
@ -307,8 +306,8 @@ string const LibScriptSearch(string const & command_in)
|
||||
string::size_type const pos1 = command.find(token_scriptpath);
|
||||
if (pos1 == string::npos)
|
||||
return command;
|
||||
// Find the end of the "$$s/some_script" word within command.
|
||||
// Assumes that the script name does not contain spaces.
|
||||
// Find the end of the "$$s/some_subdir/some_script" word within
|
||||
// command. Assumes that the script name does not contain spaces.
|
||||
string::size_type const start_script = pos1 + 4;
|
||||
string::size_type const pos2 = command.find(' ', start_script);
|
||||
string::size_type const size_script = pos2 == string::npos?
|
||||
|
@ -22,6 +22,11 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#if defined (BOOST_WINDOWS)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace boost {
|
||||
|
Loading…
Reference in New Issue
Block a user