You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/04/25 23:32:39 UTC
[46/50] mesos git commit: Added FS_DEFAULT case in rmdir.
Added FS_DEFAULT case in rmdir.
We currently dont handle special files like device files in rmdir. This
change adds FS_DEFAULT as one of the cases where we try to unlink a
file. Reference: http://man7.org/linux/man-pages/man3/fts.3.html
Review: https://reviews.apache.org/r/44230/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/02c5bae2
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/02c5bae2
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/02c5bae2
Branch: refs/heads/0.26.x
Commit: 02c5bae211141cc279b5cdd0318d3d8ef237e71e
Parents: a896cda
Author: Jojy Varghese <jo...@mesosphere.io>
Authored: Tue Mar 1 14:32:13 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Sun Mar 27 17:15:23 2016 -0400
----------------------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/02c5bae2/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
index e26df59..6fca476 100644
--- a/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
+++ b/3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp
@@ -153,6 +153,10 @@ inline Try<Nothing> rmdir(const std::string& directory, bool recursive = true)
return error;
}
break;
+ // `FTS_DEFAULT` would include any file type which is not
+ // explicitly described by any of the other `fts_info` values.
+ // TODO(jojy): Consider adding the case for `FTS_SLNONE`.
+ case FTS_DEFAULT:
case FTS_F:
case FTS_SL:
if (::unlink(node->fts_path) < 0 && errno != ENOENT) {