Fix namespace bypass on Fuchsia

We were opening the untransformed path, which bypasses the namespace.
The other platforms appear to correctly use the transformed path in
their analogous code.

Change-Id: Ide9e98aa5a689a3634c30ff0fb53f7e5b2f25564
Reviewed-on: https://dart-review.googlesource.com/25514
Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
Adam Barth 2017-12-03 07:25:12 +00:00 committed by Zach Anderson
parent 21277a4df8
commit 0df9248f26

View file

@ -201,7 +201,7 @@ File* File::Open(Namespace* namespc, const char* name, FileOpenMode mode) {
flags = flags | O_TRUNC;
}
flags |= O_CLOEXEC;
int fd = NO_RETRY_EXPECTED(openat64(ns.fd(), name, flags, 0666));
int fd = NO_RETRY_EXPECTED(openat64(ns.fd(), ns.path(), flags, 0666));
if (fd < 0) {
return NULL;
}