Skip to content

Commit

Permalink
replace custom get env login into rcutils_get_env(). (#99)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoya.Fujita <[email protected]>
  • Loading branch information
fujitatomoya authored Oct 16, 2020
1 parent 3b412ca commit 85bb625
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/rcpputils/filesystem_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#endif

#include "rcpputils/split.hpp"
#include "rcutils/get_env.h"

namespace rcpputils
{
Expand Down Expand Up @@ -451,8 +452,9 @@ inline path temp_directory_path()
}
temp_path[size] = '\0';
#else
const char * temp_path = getenv("TMPDIR");
if (!temp_path) {
const char * temp_path = NULL;
const char * ret_str = rcutils_get_env("TMPDIR", &temp_path);
if (NULL != ret_str || *temp_path == '\0') {
temp_path = "/tmp";
}
#endif
Expand Down

0 comments on commit 85bb625

Please sign in to comment.