path-util: make path_compare() and path_hash_func() ignore "."
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 1 May 2021 21:39:55 +0000 (06:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 May 2021 04:41:23 +0000 (13:41 +0900)
commit353df4438ee29068df8f36187ae7e73f889e2120
tree0db4f360a009a7488472f23561c0ed87f9b0b571
parentfe69c41ee80920714b13c958cb180cce03f4098e
path-util: make path_compare() and path_hash_func() ignore "."

This also makes path_compare() may return arbitrary integer as it now
simply pass the result of strcmp() or memcmp().

This changes the behavior of path_extract_filename/directory() when
e.g. "/." or "/./" are input. But the change should be desired.
src/basic/hash-funcs.c
src/basic/path-util.c
src/test/test-hashmap-plain.c
src/test/test-path-util.c