Index: runtime/bin/directory_win.cc |
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc |
index 3733a71384e5d734f7d4b52d1694aba85875238f..54c99c1f4d1a4feddd896823a359010064f68c87 100644 |
--- a/runtime/bin/directory_win.cc |
+++ b/runtime/bin/directory_win.cc |
@@ -170,7 +170,7 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) { |
WIN32_FIND_DATAW find_file_data; |
if (lister_ == 0) { |
- if (!listing->path_buffer().AddW(L"\\*")) { |
+ if (!listing->path_buffer().AddW(L"*")) { |
done_ = true; |
return kListError; |
} |
@@ -187,6 +187,12 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) { |
lister_ = reinterpret_cast<intptr_t>(find_handle); |
+ if (parent_ != NULL) { |
+ if (!listing->path_buffer().AddW(L"\\")) { |
+ return kListError; |
+ } |
+ } |
+ |
listing->path_buffer().Reset(path_length_); |
return HandleFindFile(listing, this, find_file_data); |