Create temporary files in the system's temp directory.
In Brillo, the temporary directory might not be /tmp. This patch uses
base::GetTempDir() instead and removes the hard-coded mentions of /tmp
when creating temporary directories.
Bug: 22024447
Test: `update_engine_client --update --omaha_url=...` mounts /system on the temp directory under /data/local/tmp
Change-Id: Ibb52cae01419511f91bdfbf6f228b74a581edde9
diff --git a/fake_p2p_manager_configuration.h b/fake_p2p_manager_configuration.h
index f639851..6874efb 100644
--- a/fake_p2p_manager_configuration.h
+++ b/fake_p2p_manager_configuration.h
@@ -35,7 +35,7 @@
class FakeP2PManagerConfiguration : public P2PManager::Configuration {
public:
FakeP2PManagerConfiguration() {
- EXPECT_TRUE(utils::MakeTempDirectory("/tmp/p2p-tc.XXXXXX", &p2p_dir_));
+ EXPECT_TRUE(utils::MakeTempDirectory("p2p-tc.XXXXXX", &p2p_dir_));
}
~FakeP2PManagerConfiguration() {