+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
+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
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;
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);
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");
+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
}
-// Substitutes spaces with underscores in filename (and path)
string const QuoteName(string const & name)
{
return (os::shell() == os::UNIX) ?
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?
# endif
# endif
+#if defined (BOOST_WINDOWS)
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
namespace fs = boost::filesystem;
namespace boost {