You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ch...@apache.org on 2018/07/12 00:09:50 UTC
mesos git commit: Fixed the error log in POSIX `os::rmdir`.
Repository: mesos
Updated Branches:
refs/heads/master 4bcfefe21 -> 2915a80bd
Fixed the error log in POSIX `os::rmdir`.
The POSIX implementation of `os::rmdir` uses FTS functions to walk
through all paths under a given directory. According to the manpage,
the `fts_path` field "contains the path specified to fts_open() as a
prefix," so should not be joined with the given directory again. See:
http://man7.org/linux/man-pages/man3/fts.3.html
Review: https://reviews.apache.org/r/67881
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2915a80b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2915a80b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2915a80b
Branch: refs/heads/master
Commit: 2915a80bd348b364d463f2e4c581ad2d996e51a0
Parents: 4bcfefe
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
Authored: Tue Jul 10 16:07:43 2018 -0700
Committer: Chun-Hung Hsiao <ch...@mesosphere.io>
Committed: Wed Jul 11 17:05:20 2018 -0700
----------------------------------------------------------------------
3rdparty/stout/include/stout/os/posix/rmdir.hpp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/2915a80b/3rdparty/stout/include/stout/os/posix/rmdir.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/os/posix/rmdir.hpp b/3rdparty/stout/include/stout/os/posix/rmdir.hpp
index 947bb24..8283ac6 100644
--- a/3rdparty/stout/include/stout/os/posix/rmdir.hpp
+++ b/3rdparty/stout/include/stout/os/posix/rmdir.hpp
@@ -21,7 +21,6 @@
#include <stout/error.hpp>
#include <stout/nothing.hpp>
-#include <stout/path.hpp>
#include <stout/stringify.hpp>
#include <stout/try.hpp>
@@ -81,9 +80,8 @@ inline Try<Nothing> rmdir(
if (::rmdir(node->fts_path) < 0 && errno != ENOENT) {
if (continueOnError) {
- LOG(ERROR) << "Failed to delete directory "
- << path::join(directory, node->fts_path)
- << ": " << os::strerror(errno);
+ LOG(ERROR) << "Failed to delete directory '" << node->fts_path
+ << "': " << os::strerror(errno);
++errorCount;
} else {
Error error = ErrnoError();
@@ -102,9 +100,8 @@ inline Try<Nothing> rmdir(
case FTS_SLNONE:
if (::unlink(node->fts_path) < 0 && errno != ENOENT) {
if (continueOnError) {
- LOG(ERROR) << "Failed to delete path "
- << path::join(directory, node->fts_path)
- << ": " << os::strerror(errno);
+ LOG(ERROR) << "Failed to delete path '" << node->fts_path
+ << "': " << os::strerror(errno);
++errorCount;
} else {
Error error = ErrnoError();