Backport path_get fix discovered in Win branch

This commit is contained in:
Jakub Konka
2019-05-31 08:38:53 +02:00
parent 0143ed548d
commit 51fc39e0e6

View File

@@ -149,7 +149,7 @@ pub fn path_get<P: AsRef<OsStr>>(
|| (component.ends_with(b"/") && !needs_final_component) =>
{
match openat(
*dir_stack.first().expect("dir_stack is never empty"),
*dir_stack.last().expect("dir_stack is never empty"),
component,
OFlag::O_RDONLY | OFlag::O_DIRECTORY | OFlag::O_NOFOLLOW,
Mode::empty(),