Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: runtime/bin/directory_win.cc

Issue 131403002: Fix Windows impl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_win.cc
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc
index 54c99c1f4d1a4feddd896823a359010064f68c87..1932bccc2b1fc710a6fe5dc262c14bad03e0872f 100644
--- a/runtime/bin/directory_win.cc
+++ b/runtime/bin/directory_win.cc
@@ -170,7 +170,8 @@ ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
WIN32_FIND_DATAW find_file_data;
if (lister_ == 0) {
- if (!listing->path_buffer().AddW(L"*")) {
+ wchar_t tail = parent_ == NULL ? L"*" : L"\\*";
+ if (!listing->path_buffer().AddW(tail)) {
done_ = true;
return kListError;
}
@@ -187,12 +188,6 @@ 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698