diff --git a/webrtc/base/filelock_unittest.cc b/webrtc/base/filelock_unittest.cc index af81c0fc8a..cf2d3fef9b 100644 --- a/webrtc/base/filelock_unittest.cc +++ b/webrtc/base/filelock_unittest.cc @@ -40,8 +40,9 @@ class FileLockTest : public testing::Test, public Runnable { protected: virtual void SetUp() { thread_lock_failed_ = false; - Filesystem::GetAppTempFolder(&temp_dir_); - temp_file_ = Pathname(temp_dir_.pathname(), kLockFile); + Pathname temp_dir; + Filesystem::GetAppTempFolder(&temp_dir); + temp_file_.SetPathname(rtc::Filesystem::TempFilename(temp_dir, kLockFile)); } void LockOnThread() { @@ -52,7 +53,6 @@ class FileLockTest : public testing::Test, public Runnable { Event done_; Thread locker_; bool thread_lock_failed_; - Pathname temp_dir_; Pathname temp_file_; };