Replaced os::dirname and os::basename with Path::dirname and Path::basename.
Review: https://reviews.apache.org/r/35131 Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/067079a8 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/067079a8 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/067079a8 Branch: refs/heads/master Commit: 067079a8a22e03693b5fce0eaafd18380180a6bf Parents: 4c75b1a Author: Till Toenshoff <[email protected]> Authored: Wed Jun 24 19:51:39 2015 +0200 Committer: Till Toenshoff <[email protected]> Committed: Wed Jun 24 19:51:40 2015 +0200 ---------------------------------------------------------------------- .../libprocess/3rdparty/stout/include/stout/flags/flags.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/067079a8/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp b/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp index 7584cb8..7527f72 100644 --- a/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp +++ b/3rdparty/libprocess/3rdparty/stout/include/stout/flags/flags.hpp @@ -27,6 +27,7 @@ #include <stout/nothing.hpp> #include <stout/option.hpp> #include <stout/os.hpp> +#include <stout/path.hpp> #include <stout/some.hpp> #include <stout/stringify.hpp> #include <stout/strings.hpp> @@ -555,14 +556,12 @@ inline Try<Nothing> FlagsBase::load( std::map<std::string, Option<std::string>> values; // Grab the program name from argv[0]. - programName_ = argc > 0 ? os::basename(argv[0]).get() : ""; + programName_ = argc > 0 ? Path(argv[0]).basename() : ""; if (prefix.isSome()) { values = extract(prefix.get()); } - - // Read flags from the command line. for (int i = 1; i < argc; i++) { const std::string arg(strings::trim(argv[i])); @@ -620,7 +619,7 @@ inline Try<Nothing> FlagsBase::load( } // Grab the program name from argv, without removing it. - programName_ = argc > 0 ? os::basename(*(argv[0])).get() : ""; + programName_ = argc > 0 ? Path(*(argv[0])).basename() : ""; // Keep the arguments that are not being processed as flags. std::vector<char*> args;
