libc: remove trailing slash during file operations

POSIX stipulates that a trailing '/' on a path is valid for any
operation where the final path element is a directory.

Fixes #1330
This commit is contained in:
Emery Hemingway 2016-03-11 16:39:22 +01:00 committed by Christian Helmuth
parent bc058e698a
commit da16ecc002

View File

@ -185,6 +185,7 @@ static void resolve_symlinks(char const *path, Absolute_path &resolved_path)
} while (symlink_resolved_in_this_iteration);
resolved_path.import(next_iteration_working_path.base());
resolved_path.remove_trailing('/');
PDBGV("resolved_path = %s", resolved_path.base());
}