[filesystem] path normalization?

Hello, suppose I have this: path p = .........; p /= "../../../a/b/c" ; with current CVS version of filesystem I get paths like: bin/gcc/debug/threading-multi/../../../../bin/nm/debug/threading-multi/print_and_set.map which are correct, but it has reduntant elements. Say first ".." undoes "threading-multi" and next ".." undoes "debug" and the path is the same as bin/nm/debug/threading-multi/print_and_set.map which is much smaller, and so better for things like error diagnostic. Any change that filesystem perform such path normalization either during operator/= or as a separator function? TIA, Volodya

Vladimir Prus wrote:
Hello, suppose I have this:
path p = .........; p /= "../../../a/b/c" ;
with current CVS version of filesystem I get paths like:
bin/gcc/debug/threading-multi/../../../../bin/nm/debug/threading-multi/print_and_set.map
which are correct, but it has reduntant elements. Say first ".." undoes "threading-multi" and next ".." undoes "debug" and the path is the same as
foo/.. is not redundant when foo is a symbolic link. Regards, m Send instant messages to your online friends http://au.messenger.yahoo.com

Martin Wille wrote:
Vladimir Prus wrote:
Hello, suppose I have this:
path p = .........; p /= "../../../a/b/c" ;
with current CVS version of filesystem I get paths like:
bin/gcc/debug/threading-multi/../../../../bin/nm/debug/threading-multi/print_and_set.map
which are correct, but it has reduntant elements. Say first ".." undoes "threading-multi" and next ".." undoes "debug" and the path is the same as
foo/.. is not redundant when foo is a symbolic link.
Ah, right. But since filesystem can check if a path is symbolic link, it's still possible to implement 'normalize' operation (external to path) that works correctly. - Volodya
participants (2)
-
Martin Wille
-
Vladimir Prus