Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2014-01-31
19:05 • Ticket [6c49da8a19] Edge case in file normalize? status still Open with 3 ... artifact: 4de45c1089 user: dgp
09:35 • Ticket [6c49da8a19]: 3 changes artifact: 01fa314ef3 user: dkf
09:34 • New ticket [6c49da8a19]. artifact: a5ae6badef user: dkf

Edge case in [file normalize]?

Open6c49da8a19ab9fb07b4366fe37ebee105e96a859Created 13 years agoUpdated 13 years ago
Descriptionhtml2014-01-31 09:34:53

As reported in this Stack Overflow question, it looks like there's an evil edge case that's gone wrong in file normalize.

Directory structure setup:

/tmp/fileA.txt
/tmp/sidedir/fileA.txt
/tmp/subdir/fileA.txt
/tmp/subdir/sidedir_link -> /tmp/sidedir
Problem trace:
wish% file normalize sidedir_link/fileA.txt
/tmp/sidedir/fileA.txt
wish% ::utils::realpath sidedir_link/fileA.txt
/tmp/sidedir/fileA.txt
wish% file normalize sidedir_link/../fileA.txt
/tmp/subdir/fileA.txt
wish% ::utils::realpath sidedir_link/../fileA.txt
/tmp/fileA.txt
“Note: The difference is /tmp/subdir/fileA.txt versus /tmp/fileA.txt.”
It's reportedly an issue with both 8.4.9 and 8.6.1 so I expect it to be present in all other 8.4, 8.5 and 8.6 versions.

dkf Ticket [6c49da8a19]: 3 changes [History diff]2014-01-31 09:35:18
dgpplain2014-01-31 19:05:20
This is probably a Dup.

Related tickets are 3577801 and 961646.

If it were easy to fix (or to define what
functioning is properly defined as "fixed"),
it would be done by now.
Log in (anonymous is fine) to add a comment.