summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/libs/filesystem/src/operations.cpp')
-rw-r--r--3rdParty/Boost/src/libs/filesystem/src/operations.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/3rdParty/Boost/src/libs/filesystem/src/operations.cpp b/3rdParty/Boost/src/libs/filesystem/src/operations.cpp
index d066e40..09b8853 100644
--- a/3rdParty/Boost/src/libs/filesystem/src/operations.cpp
+++ b/3rdParty/Boost/src/libs/filesystem/src/operations.cpp
@@ -73,17 +73,15 @@ using std::wstring;
const fs::path dot_dot_path("..");
# include <sys/types.h>
# include <sys/stat.h>
-# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(ANDROID)
+# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__)
# include <sys/statvfs.h>
# define BOOST_STATVFS statvfs
# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
-# elif defined (ANDROID)
-# include <sys/vfs.h>
-# define BOOST_STATVFS statfs
-# define BOOST_STATVFS_F_FRSIZE static_cast<boost::uintmax_t>(vfs.f_bsize)
# else
# ifdef __OpenBSD__
# include <sys/param.h>
+# elif defined(__ANDROID__)
+# include <sys/vfs.h>
# endif
# include <sys/mount.h>
# define BOOST_STATVFS statfs
@@ -777,6 +775,7 @@ namespace detail
path canonical(const path& p, const path& base, system::error_code* ec)
{
path source (p.is_absolute() ? p : absolute(p, base));
+ path root(source.root_path());
path result;
system::error_code local_ec;
@@ -811,7 +810,8 @@ namespace detail
continue;
if (*itr == dot_dot_path)
{
- result.remove_filename();
+ if (result != root)
+ result.remove_filename();
continue;
}
@@ -931,6 +931,7 @@ namespace detail
}
path parent = p.parent_path();
+ BOOST_ASSERT_MSG(parent != p, "internal error: p == p.parent_path()");
if (!parent.empty())
{
// determine if the parent exists
@@ -1411,7 +1412,7 @@ namespace detail
// - See the fchmodat() Linux man page:
// "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
- && !(defined(__SUNPRO_CC) || defined(sun)) \
+ && !(defined(__SUNPRO_CC) || defined(__sun) || defined(sun)) \
&& !(defined(linux) || defined(__linux) || defined(__linux__))
if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
!(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))