Posted to tcl by zoro2 at Wed Oct 17 09:13:33 GMT 2012view raw
- % exec ls -l _temp/ln/d
- total 0
- -rw-r--r-- 1 zoro zoro 0 2012-10-17 11:08 f
- lrwxrwxrwx 1 zoro zoro 4 2012-10-17 11:05 l -> ../f
- lrwxrwxrwx 1 zoro zoro 1 2012-10-17 11:10 l2 -> f
- % file normalize _temp/ln/d/l/../../f
- /tmp/_temp/ln/d/f
- % file normalize _temp/ln/d/l2/../../f
- /tmp/_temp/ln/f
- % file normalize _temp/ln/d/f/../../f
- /tmp/_temp/ln/f
- Notice that it only reports incorrect path for symlink that points to ../f.