Chromium Code Reviews| Index: runtime/bin/directory_win.cc |
| diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc |
| index 7fedd6c0bc9c29acd0c76219b1ced13c475c965f..e655751f86ec1d2c73a96464c925056a1d3e5348 100644 |
| --- a/runtime/bin/directory_win.cc |
| +++ b/runtime/bin/directory_win.cc |
| @@ -233,6 +233,16 @@ static bool DeleteEntry(LPWIN32_FIND_DATA find_file_data, |
| static bool DeleteRecursively(const char* dir_name) { |
| + // If the directory is a junction, it's pointing to some other place in the |
| + // filesystem that we do not want to recurse into. |
| + DWORD attributes = GetFileAttributes(dir_name); |
| + if ((attributes != INVALID_FILE_ATTRIBUTES) && |
| + (attributes & FILE_ATTRIBUTE_REPARSE_POINT) != 0) { |
| + printf("%s junction\n", dir_name); |
|
Søren Gjesse
2012/08/17 07:07:37
Please remove debug print.
Mads Ager (google)
2012/08/17 07:08:46
Remove debug printing.
Bob Nystrom
2012/08/20 23:24:32
Done.
|
| + // Just delete the junction itself. |
| + return RemoveDirectory(dir_name) != 0; |
| + } |
| + |
| // Compute full path for the directory currently being deleted. The |
| // path buffer will be used to construct the current path in the |
| // recursive traversal. path_length does not always equal |