Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: base/file_util_posix.cc

Issue 8382001: OpenBSD patches for base and build, part 2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fixes for previous patchset Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/file_util_posix.cc
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
index bb9977ed87f9d13c4a7af482b3bd7fdbad9df592..eff1cc5f5bca42daf873587f7d1ea5302ac4f4e9 100644
--- a/base/file_util_posix.cc
+++ b/base/file_util_posix.cc
@@ -912,7 +912,14 @@ bool GetTempDir(FilePath* path) {
#if !defined(OS_ANDROID)
bool GetShmemTempDir(FilePath* path) {
+#if defined(OS_LINUX)
*path = FilePath("/dev/shm");
+#else
+ if (!file_util::GetTempDir(path)) {
+ // Set it to /tmp if all else fails.
Mark Mentovai 2011/10/24 17:06:12 I would have just made this do |return GetTempDir(
Robert Nagy 2011/10/24 18:00:57 Done.
+ *path = FilePath("/tmp");
+ }
+#endif
return true;
}
#endif

Powered by Google App Engine
This is Rietveld 408576698