diff --git a/include/boost/filesystem/path.hpp b/include/boost/filesystem/path.hpp index 9c6e32a4..b643b7f0 100644 --- a/include/boost/filesystem/path.hpp +++ b/include/boost/filesystem/path.hpp @@ -526,7 +526,8 @@ namespace filesystem bool is_relative() const { return !is_absolute(); } bool is_absolute() const { -# ifdef BOOST_WINDOWS_API + // Windows CE has no root name (aka driver letters) +# if defined(BOOST_WINDOWS_API) && !defined(UNDER_CE) return has_root_name() && has_root_directory(); # else return has_root_directory(); diff --git a/src/operations.cpp b/src/operations.cpp index f34b0761..3f38a244 100644 --- a/src/operations.cpp +++ b/src/operations.cpp @@ -1101,6 +1101,9 @@ namespace detail } return cur; +# elif defined(UNDER_CE) + // Windows CE has no current directory, so everything's relative to the root of the directory tree + return L"\\"; # else DWORD sz; if ((sz = ::GetCurrentDirectoryW(0, NULL)) == 0)sz = 1; @@ -1115,8 +1118,13 @@ namespace detail BOOST_FILESYSTEM_DECL void current_path(const path& p, system::error_code* ec) { +# ifdef UNDER_CE + error(BOOST_ERROR_NOT_SUPPORTED, p, ec, + "boost::filesystem::current_path"); +# else error(!BOOST_SET_CURRENT_DIRECTORY(p.c_str()) ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::current_path"); +# endif } BOOST_FILESYSTEM_DECL