martinzink commented on code in PR #1424:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1424#discussion_r1044596070


##########
extensions/sftp/tests/ListSFTPTests.cpp:
##########
@@ -139,15 +139,8 @@ class ListSFTPTestsFixture {
     std::fstream file;
     std::stringstream ss;
     ss << src_dir << "/vfs/" << relative_path;
-    auto full_path = ss.str();
-    std::deque<std::string> parent_dirs;
-    std::string parent_dir = full_path;
-    while (!(parent_dir = 
utils::file::FileUtils::get_parent_path(parent_dir)).empty()) {
-      parent_dirs.push_front(parent_dir);
-    }
-    for (const auto& dir : parent_dirs) {
-      utils::file::FileUtils::create_dir(dir);
-    }
+    std::filesystem::path full_path = ss.str();

Review Comment:
   Good idea changed this in 
[extensions/sftp/tests/ListSFTPTests.cpp](https://github.com/apache/nifi-minifi-cpp/pull/1424/commits/6c775d116236c92105c7be38bb284f309c27887c#diff-ac90fb77395d946dce409066d0015e9308fb4151efdb0d2cc146edc1abfe1552R155)
 
[extensions/sftp/tests/ListThenFetchSFTPTests.cpp](https://github.com/apache/nifi-minifi-cpp/pull/1424/commits/6c775d116236c92105c7be38bb284f309c27887c#diff-dfaf51b7f8862c8ffdda0f89bd11d14b8fa83ef70ba0d9e5e686acb1afa51e5fR191)
 



##########
extensions/standard-processors/tests/unit/ProcessorTests.cpp:
##########
@@ -197,10 +196,8 @@ TEST_CASE("Test GetFile Ignore", "[getfileCreate3]") {
   REQUIRE(record == nullptr);
   REQUIRE(records.empty());
 
-  const std::string hidden_file_name = [&] {
-    std::stringstream ss;
-    ss << dir << utils::file::FileUtils::get_separator() << 
".filewithoutanext";
-    return ss.str();
+  const std::filesystem::path hidden_file_name = [&] {
+    return dir / ".filewithoutanext";
   }();

Review Comment:
   :sweat_smile: 
https://github.com/apache/nifi-minifi-cpp/pull/1424/commits/6c775d116236c92105c7be38bb284f309c27887c#diff-8caa2f65fe058d943caa4cd2c876226de0a63bea73ce1f7ffcb0550be1d7ed4fR199



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to