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

Unified Diff: runtime/bin/directory_posix.cc

Issue 10381150: Fix directory listing to actually have the semantics intended. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Windows part Created 8 years, 7 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 | runtime/bin/directory_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_posix.cc
diff --git a/runtime/bin/directory_posix.cc b/runtime/bin/directory_posix.cc
index bb1cbbdf95582e749f146f0984e800c7c6ba94c1..1c672a804d7e86ad6a6f0e51b2e20848f50a3a4c 100644
--- a/runtime/bin/directory_posix.cc
+++ b/runtime/bin/directory_posix.cc
@@ -134,21 +134,20 @@ static bool ListRecursively(const char* dir_name,
while ((read = TEMP_FAILURE_RETRY(readdir_r(dir_pointer,
&entry,
&result))) == 0 &&
- result != NULL &&
- success) {
+ result != NULL) {
switch (entry.d_type) {
case DT_DIR:
- success = success && HandleDir(entry.d_name,
- path,
- path_length,
- recursive,
- listing);
+ success = HandleDir(entry.d_name,
+ path,
+ path_length,
+ recursive,
+ listing) && success;
break;
case DT_REG:
- success = success && HandleFile(entry.d_name,
- path,
- path_length,
- listing);
+ success = HandleFile(entry.d_name,
+ path,
+ path_length,
+ listing) && success;
break;
case DT_LNK:
case DT_UNKNOWN: {
@@ -172,16 +171,16 @@ static bool ListRecursively(const char* dir_name,
break;
}
if (S_ISDIR(entry_info.st_mode)) {
- success = success && HandleDir(entry.d_name,
- path,
- path_length,
- recursive,
- listing);
+ success = HandleDir(entry.d_name,
+ path,
+ path_length,
+ recursive,
+ listing) && success;
} else if (S_ISREG(entry_info.st_mode)) {
- success = success && HandleFile(entry.d_name,
- path,
- path_length,
- listing);
+ success = HandleFile(entry.d_name,
+ path,
+ path_length,
+ listing) && success;
}
ASSERT(!S_ISLNK(entry_info.st_mode));
break;
« no previous file with comments | « no previous file | runtime/bin/directory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698