diff options
author | Tanzinul Islam <tanzinul.islam@gmail.com> | 2023-08-26 07:53:45 (GMT) |
---|---|---|
committer | Tanzinul Islam <t_17_7@hotmail.com> | 2023-08-26 07:53:45 (GMT) |
commit | edf9b4964d28f0f18552ff39c8f182b7903e19e3 (patch) | |
tree | 666ace318745906f38bc7c3f5a3d1fb0267178cd | |
parent | 14d05f4708c97d1efc0db917dd32ef2f2013686a (diff) | |
download | googletest-edf9b4964d28f0f18552ff39c8f182b7903e19e3.zip googletest-edf9b4964d28f0f18552ff39c8f182b7903e19e3.tar.gz googletest-edf9b4964d28f0f18552ff39c8f182b7903e19e3.tar.bz2 |
Reuse TempDir() functionrefs/pull/4342/head
-rw-r--r-- | googletest/src/gtest-port.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 589ace5..628ab3d 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -1067,10 +1067,7 @@ class CapturedStream { // // However, prefer using the TMPDIR environment variable if set, as newer // devices may have /data/local/tmp read-only. - if (auto tmpdir = ::getenv("TMPDIR")) - name_template.assign(tmpdir) += '/'; - else - name_template = "/data/local/tmp/"; + name_template = TempDir(); #elif defined(GTEST_OS_IOS) char user_temp_dir[PATH_MAX + 1]; |