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

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

Issue 2957593002: Spelling fixes e to i. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/typed_mock/lib/typed_mock.dart ('k') | runtime/bin/platform_macos.cc » ('j') | 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(HOST_OS_WINDOWS) 6 #if defined(HOST_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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 486
487 bool Directory::Rename(const char* path, const char* new_path) { 487 bool Directory::Rename(const char* path, const char* new_path) {
488 Utf8ToWideScope system_path(path); 488 Utf8ToWideScope system_path(path);
489 Utf8ToWideScope system_new_path(new_path); 489 Utf8ToWideScope system_new_path(new_path);
490 ExistsResult exists = ExistsHelper(system_path.wide()); 490 ExistsResult exists = ExistsHelper(system_path.wide());
491 if (exists != EXISTS) { 491 if (exists != EXISTS) {
492 return false; 492 return false;
493 } 493 }
494 ExistsResult new_exists = ExistsHelper(system_new_path.wide()); 494 ExistsResult new_exists = ExistsHelper(system_new_path.wide());
495 // MoveFile does not allow replacing exising directories. Therefore, 495 // MoveFile does not allow replacing existing directories. Therefore,
496 // if the new_path is currently a directory we need to delete it 496 // if the new_path is currently a directory we need to delete it
497 // first. 497 // first.
498 if (new_exists == EXISTS) { 498 if (new_exists == EXISTS) {
499 bool success = Delete(new_path, true); 499 bool success = Delete(new_path, true);
500 if (!success) { 500 if (!success) {
501 return false; 501 return false;
502 } 502 }
503 } 503 }
504 DWORD flags = MOVEFILE_WRITE_THROUGH; 504 DWORD flags = MOVEFILE_WRITE_THROUGH;
505 int move_status = 505 int move_status =
506 MoveFileExW(system_path.wide(), system_new_path.wide(), flags); 506 MoveFileExW(system_path.wide(), system_new_path.wide(), flags);
507 return (move_status != 0); 507 return (move_status != 0);
508 } 508 }
509 509
510 } // namespace bin 510 } // namespace bin
511 } // namespace dart 511 } // namespace dart
512 512
513 #endif // defined(HOST_OS_WINDOWS) 513 #endif // defined(HOST_OS_WINDOWS)
OLDNEW
« no previous file with comments | « pkg/typed_mock/lib/typed_mock.dart ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698