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

Unified Diff: runtime/bin/directory_android.cc

Issue 2580133002: Fix directory existence query error (Closed)
Patch Set: Use ENOTDIR. Fix test 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 | runtime/bin/directory_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory_android.cc
diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc
index 49077a325ec280cb261c4f88e4473c51ccb8f66b..b4ad7c04e2b4f0b3adc35aabe6cd86a36f8360b8 100644
--- a/runtime/bin/directory_android.cc
+++ b/runtime/bin/directory_android.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 = ENOTDIR;
return DOES_NOT_EXIST;
}
} else {
« no previous file with comments | « no previous file | runtime/bin/directory_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698