| Index: base/file_util_posix.cc
|
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
|
| index 28d6a61578a4b50a063616a84cbc44ca2a8274e5..99025d068482aa40182b59aa9c5b8fa79982e892 100644
|
| --- a/base/file_util_posix.cc
|
| +++ b/base/file_util_posix.cc
|
| @@ -522,6 +522,23 @@ bool CreateDirectory(const FilePath& full_path) {
|
| return true;
|
| }
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +// TODO(rkc): Refactor GetFileInfo and FileEnumerator to handle symlinks
|
| +// correctly; this is just a hack to fix symlink handling for now for ChromeOS
|
| +bool IsLink(const FilePath& file_path) {
|
| + struct stat 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)
|
| + return false;
|
| +
|
| + if (S_ISLNK(st.st_mode))
|
| + return true;
|
| + else
|
| + return false;
|
| +}
|
| +#endif
|
| +
|
| bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) {
|
| stat_wrapper_t file_info;
|
| if (CallStat(file_path.value().c_str(), &file_info) != 0)
|
|
|