Add a fancy new paths_are_equivalent function to test for equivalent

paths instead of merely equal ones
This commit is contained in:
ridiculousfish
2013-08-27 18:26:22 -07:00
parent 85ce80d72e
commit 24f1da7f30
3 changed files with 61 additions and 16 deletions

3
path.h
View File

@@ -73,6 +73,9 @@ bool path_can_be_implicit_cd(const wcstring &path,
*/
void path_make_canonical(wcstring &path);
/** Check if two paths are equivalent, which means to ignore runs of multiple slashes (or trailing slashes) */
bool paths_are_equivalent(const wcstring &p1, const wcstring &p2);
bool path_is_valid(const wcstring &path, const wcstring &working_directory);
/** Returns whether the two paths refer to the same file */