Chromium Code Reviews| Index: base/file_util_posix.cc |
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc |
| index c9a0d9bb474c2d8e6f15321b67c72999f1153b66..2f771dbbaf4ff6c957258dd924a5834fcbbcd891 100644 |
| --- a/base/file_util_posix.cc |
| +++ b/base/file_util_posix.cc |
| @@ -207,8 +207,8 @@ bool Delete(const FilePath& path, bool recursive) { |
| base::ThreadRestrictions::AssertIOAllowed(); |
| const char* path_str = path.value().c_str(); |
| stat_wrapper_t file_info; |
| - int test = CallStat(path_str, &file_info); |
| - if (test != 0) { |
| + int test_link = CallLstat(path_str, &file_info); |
|
satorux1
2012/06/29 18:25:20
test_link -> test. lstat() checks regular files to
yoshiki
2012/06/29 19:12:27
Done.
|
| + if (test_link != 0) { |
| // The Windows version defines this condition as success. |
| bool ret = (errno == ENOENT || errno == ENOTDIR); |
| return ret; |
| @@ -578,10 +578,10 @@ bool CreateDirectory(const FilePath& full_path) { |
| // TODO(rkc): Refactor GetFileInfo and FileEnumerator to handle symlinks |
| // correctly. http://code.google.com/p/chromium-os/issues/detail?id=15948 |
| bool IsLink(const FilePath& file_path) { |
| - struct stat st; |
| + stat_wrapper_t st; |
| // If we can't lstat the file, it's safe to assume that the file won't at |
| // least be a 'followable' link. |
| - if (lstat(file_path.value().c_str(), &st) != 0) |
| + if (CallLstat(file_path.value().c_str(), &st) != 0) |
| return false; |
| if (S_ISLNK(st.st_mode)) |