Skip to content

Commit

Permalink
Revert "Make sure that an existing path is a directory for create_dir…
Browse files Browse the repository at this point in the history
…ectories (#95)" (#96)

This reverts commit a54db52.
  • Loading branch information
wjwwood authored Sep 25, 2020
1 parent a54db52 commit ba5d1e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion include/rcpputils/filesystem_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ inline bool create_directories(const path & p)
#endif
}
}
return p_built.is_directory() && status == 0;
return status == 0;
}

/**
Expand Down
1 change: 0 additions & 1 deletion test/test_filesystem_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ TEST(TestFilesystemHelper, filesystem_manipulation)
EXPECT_TRUE(rcpputils::fs::exists(file));
EXPECT_TRUE(rcpputils::fs::is_regular_file(file));
EXPECT_FALSE(rcpputils::fs::is_directory(file));
EXPECT_FALSE(rcpputils::fs::create_directories(file));
EXPECT_GE(rcpputils::fs::file_size(file), expected_file_size);
EXPECT_THROW(rcpputils::fs::file_size(dir), std::system_error) <<
"file_size is only applicable for files!";
Expand Down

0 comments on commit ba5d1e4

Please sign in to comment.