| Index: base/files/file_util_win.cc
|
| diff --git a/base/files/file_util_win.cc b/base/files/file_util_win.cc
|
| index 57dbb809c67fb67175ac00eb636650faccea645a..e254232f66305910e0bd64d0f2c7ab71b5e3fac2 100644
|
| --- a/base/files/file_util_win.cc
|
| +++ b/base/files/file_util_win.cc
|
| @@ -231,11 +231,15 @@
|
|
|
| bool PathIsWritable(const FilePath& path) {
|
| ThreadRestrictions::AssertIOAllowed();
|
| - win::ScopedHandle dir(
|
| + HANDLE dir =
|
| CreateFile(path.value().c_str(), FILE_ADD_FILE, kFileShareAll,
|
| - NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL));
|
| -
|
| - return dir.IsValid();
|
| + NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
| +
|
| + if (dir == INVALID_HANDLE_VALUE)
|
| + return false;
|
| +
|
| + CloseHandle(dir);
|
| + return true;
|
| }
|
|
|
| bool DirectoryExists(const FilePath& path) {
|
|
|