Chromium Code Reviews| Index: tests/skia_test.cpp |
| diff --git a/tests/skia_test.cpp b/tests/skia_test.cpp |
| index 238252d7377629e19f193b1f7de93d945fa75b0b..f6c7839609d5f2ab39151589ae7e603c477b3622 100644 |
| --- a/tests/skia_test.cpp |
| +++ b/tests/skia_test.cpp |
| @@ -112,22 +112,6 @@ private: |
| bool fAllowThreaded; |
| }; |
| -static const char* make_canonical_dir_path(const char* path, SkString* storage) { |
| - if (path) { |
| - // clean it up so it always has a trailing searator |
| - size_t len = strlen(path); |
| - if (0 == len) { |
| - path = NULL; |
| - } else if (SkPATH_SEPARATOR != path[len - 1]) { |
| - // resize to len + 1, to make room for searator |
| - storage->set(path, len + 1); |
| - storage->writable_str()[len] = SkPATH_SEPARATOR; |
| - path = storage->c_str(); |
| - } |
| - } |
| - return path; |
| -} |
| - |
| static SkString gTmpDir; |
|
epoger
2013/06/04 15:15:34
Hey, if this change fixes an existing problem, I'm
scroggo
2013/06/04 19:50:39
Done.
epoger
2013/06/05 14:34:14
My reasoning was: why use 2 global variables (gTmp
|
| const SkString& Test::GetTmpDir() { |
| @@ -219,10 +203,10 @@ int tool_main(int argc, char** argv) { |
| SkCommandLineFlags::Parse(argc, argv); |
| if (!FLAGS_tmpDir.isEmpty()) { |
| - make_canonical_dir_path(FLAGS_tmpDir[0], &gTmpDir); |
| + gTmpDir = SkOSPath::SkPathJoin(FLAGS_tmpDir[0], NULL); |
| } |
| if (!FLAGS_resourcePath.isEmpty()) { |
| - make_canonical_dir_path(FLAGS_resourcePath[0], &gResourcePath); |
| + gResourcePath = SkOSPath::SkPathJoin(FLAGS_resourcePath[0], NULL); |
| } |
| #if SK_ENABLE_INST_COUNT |