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

Unified Diff: base/files/file_util_posix.cc

Issue 2577163002: A follow-up nit fix for jumplist file operations (Closed)
Patch Set: Created 4 years 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 | base/files/file_util_win.cc » ('j') | base/files/file_util_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_posix.cc
diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc
index a8db2599c642ff920e87533f0bcb6566a7253168..1498cd26ddf7c0359145f8418a717baa3909533d 100644
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -276,9 +276,7 @@ bool CopyDirectory(const FilePath& from_path,
FilePath real_from_path = MakeAbsoluteFilePath(from_path);
if (real_from_path.empty())
return false;
- if (real_to_path.value().size() >= real_from_path.value().size() &&
- real_to_path.value().compare(0, real_from_path.value().size(),
- real_from_path.value()) == 0) {
+ if (real_to_path == real_from_path || real_from_path.IsParent(real_to_path)) {
grt (UTC plus 2) 2016/12/15 21:28:32 nit: omit braces for consistency with the conditio
return false;
}
« no previous file with comments | « no previous file | base/files/file_util_win.cc » ('j') | base/files/file_util_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698