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

Unified Diff: runtime/bin/directory_macos.cc

Issue 2580133002: Fix directory existence query error (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
Index: runtime/bin/directory_macos.cc
diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc
index b24b9c8d4b4b4d93a86c5d4d15ad4d66d0ba4ea7..e5de4d53c661a501ff3688f2c957275327c1775d 100644
--- a/runtime/bin/directory_macos.cc
+++ b/runtime/bin/directory_macos.cc
@@ -351,6 +351,9 @@ Directory::ExistsResult Directory::Exists(const char* dir_name) {
if (S_ISDIR(entry_info.st_mode)) {
return EXISTS;
} else {
+ // An OSError may be constructed based on the return value of this
+ // function, so set errno to something that makes sense.
+ errno = ENOENT;
return DOES_NOT_EXIST;
}
} else {

Powered by Google App Engine
This is Rietveld 408576698