Chromium Code Reviews| Index: runtime/bin/directory_android.cc |
| diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc |
| index 5d2464902b28456861fb878f739cf4b2f5c7f8d3..40bcde3f64f431c80f2b4bc12f79243371c7ee00 100644 |
| --- a/runtime/bin/directory_android.cc |
| +++ b/runtime/bin/directory_android.cc |
| @@ -373,19 +373,6 @@ bool Directory::Create(const char* dir_name) { |
| } |
| -// Android doesn't currently provide mkdtemp. Once Android provied mkdtemp, |
|
zra
2016/03/03 18:54:04
This comment appears to have been inaccurate. mkdt
|
| -// remove this function in favor of calling mkdtemp directly. |
| -static char* MakeTempDirectory(char* path_template) { |
| - if (mktemp(path_template) == NULL) { |
| - return NULL; |
| - } |
| - if (mkdir(path_template, 0700) != 0) { |
| - return NULL; |
| - } |
| - return path_template; |
| -} |
| - |
| - |
| char* Directory::SystemTemp() { |
| // Android does not have a /tmp directory. A partial substitute, |
| // suitable for bring-up work and tests, is to create a tmp |
| @@ -416,7 +403,7 @@ char* Directory::CreateTemp(const char* prefix) { |
| } |
| char* result; |
| do { |
| - result = MakeTempDirectory(path.AsString()); |
| + result = mkdtemp(path.AsString()); |
| } while (result == NULL && errno == EINTR); |
| if (result == NULL) { |
| return NULL; |