Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: a5ae6badef99b3613658a3af52bfadea758f1d69
Ticket: 6c49da8a19ab9fb07b4366fe37ebee105e96a859
Edge case in [file normalize]?
User & Date: dkf 2014-01-31 09:34:53
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/html"
  4. comment changed to:
    As reported in <a href="http://stackoverflow.com/q/21439453/301832">this Stack Overflow question</a>, it looks like there's an evil edge case that's gone wrong in <tt>file normalize</tt>.
    <p>
    Directory structure setup:
    <pre>
    /tmp/fileA.txt
    /tmp/sidedir/fileA.txt
    /tmp/subdir/fileA.txt
    /tmp/subdir/sidedir_link -> /tmp/sidedir
    </pre>
    Problem trace:
    <pre>
    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
    </pre>
    <blockquote>“<i>Note:</i> The difference is <tt>/tmp/subdir/fileA.txt</tt> versus <tt>/tmp/fileA.txt</tt>.”</blockquote>
    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.
    
  5. foundin changed to: "8.4.9, 8.6.1"
  6. is_private changed to: "0"
  7. login: "dkf"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "dkf"
  13. subsystem changed to: "36. Pathname Management"
  14. title changed to: "Edge case in [file normalize]?"
  15. type changed to: "Bug"