Normalization of a generic format pathname means:
If the path is empty, stop.
Replace each directory-separator with a preferred-separator. [ Note: The generic pathname grammar ([fs.path.generic]) defines directory-separator as one or more slashes and preferred-separators. — end note ]
Remove each dot filename and any immediately following directory-separator.
If there is a root-directory, remove all dot-dot filenames and any directory-separators immediately following them. [ Note: These dot-dot filenames attempt to refer to nonexistent parent directories. — end note ]
If the last filename is dot-dot, remove any trailing directory-separator.
If the path is empty, add a dot.