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

Side by Side Diff: runtime/bin/directory_win.cc

Issue 130973005: Really fix Windows build. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "bin/directory.h" 8 #include "bin/directory.h"
9 #include "bin/file.h" 9 #include "bin/file.h"
10 #include "bin/utils.h" 10 #include "bin/utils.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 164
165 ListType DirectoryListingEntry::Next(DirectoryListing* listing) { 165 ListType DirectoryListingEntry::Next(DirectoryListing* listing) {
166 if (done_) { 166 if (done_) {
167 return kListDone; 167 return kListDone;
168 } 168 }
169 169
170 WIN32_FIND_DATAW find_file_data; 170 WIN32_FIND_DATAW find_file_data;
171 171
172 if (lister_ == 0) { 172 if (lister_ == 0) {
173 wchar_t tail = parent_ == NULL ? L"*" : L"\\*"; 173 const wchar_t* tail = parent_ == NULL ? L"*" : L"\\*";
174 if (!listing->path_buffer().AddW(tail)) { 174 if (!listing->path_buffer().AddW(tail)) {
175 done_ = true; 175 done_ = true;
176 return kListError; 176 return kListError;
177 } 177 }
178 178
179 path_length_ = listing->path_buffer().length() - 1; 179 path_length_ = listing->path_buffer().length() - 1;
180 180
181 HANDLE find_handle = FindFirstFileW(listing->path_buffer().AsStringW(), 181 HANDLE find_handle = FindFirstFileW(listing->path_buffer().AsStringW(),
182 &find_file_data); 182 &find_file_data);
183 183
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 MoveFileExW(system_path, system_new_path, flags); 471 MoveFileExW(system_path, system_new_path, flags);
472 free(const_cast<wchar_t*>(system_path)); 472 free(const_cast<wchar_t*>(system_path));
473 free(const_cast<wchar_t*>(system_new_path)); 473 free(const_cast<wchar_t*>(system_new_path));
474 return (move_status != 0); 474 return (move_status != 0);
475 } 475 }
476 476
477 } // namespace bin 477 } // namespace bin
478 } // namespace dart 478 } // namespace dart
479 479
480 #endif // defined(TARGET_OS_WINDOWS) 480 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« 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