From 694dfb28ba89e9b83b47e5eab1ee6ae65422942b Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Thu, 16 Nov 2017 20:51:18 +0000 Subject: [PATCH] Allowing combination of out_dir and of. --- lib/local/Utilities/src/RecorderOpenFace.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/local/Utilities/src/RecorderOpenFace.cpp b/lib/local/Utilities/src/RecorderOpenFace.cpp index b084c61..ef20f97 100644 --- a/lib/local/Utilities/src/RecorderOpenFace.cpp +++ b/lib/local/Utilities/src/RecorderOpenFace.cpp @@ -86,15 +86,19 @@ RecorderOpenFace::RecorderOpenFace(const std::string in_filename, RecorderOpenFa valid[i] = true; } - // Determine output directory - bool output_found = false; for (size_t i = 0; i < arguments.size(); ++i) { if (arguments[i].compare("-out_dir") == 0) { record_root = arguments[i + 1]; } - else if (!output_found && arguments[i].compare("-of") == 0) + } + + // Determine output directory + bool output_found = false; + for (size_t i = 0; i < arguments.size(); ++i) + { + if (!output_found && arguments[i].compare("-of") == 0) { record_root = (boost::filesystem::path(record_root) / boost::filesystem::path(arguments[i + 1])).remove_filename().string(); filename = path(boost::filesystem::path(arguments[i + 1])).replace_extension("").filename().string();