Skip to content
Tcl Source Code History Of Ticket 61f4c67770
Login

History Of Ticket 61f4c67770

Artifacts Associated With Ticket 61f4c67770

  1. Ticket change [257d449d43] (rid 215809) by geballin on 2023-06-20 16:02:22:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      This is a bug in the info command.
      The info command doesn't care of the working directory when changed by the program using a simple cd.
      This give a bug when used in conjonction with file normalize.
      
      Exemple with this code, run from everywhere using relative file path for launching the script tclsh or source it, it should always find himself which doesn't work :
      
          cd [file dirname [file normalize [info script]]]
          set myselfPath [file normalize [info script]]
          puts $myselfPath
          if {[file exist $myselfPath]} {
            puts "I found myself"
          } else {
            puts "I can't find the file $myselfPath which should be myself"
            exit 1
          }
      
      A simple way to avoid that kind of bugs will be to have [info script] always return absolute path, even if source or Tcl_EvalFile launched with a relative filename as argument.
      
    5. foundin initialized to: "8.6.13"
    6. is_private initialized to: "0"
    7. login: "geballin"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "6dcd7ca00fdbf25f6645f6a67a11668e7b5ef099"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "geballin"
    14. subsystem initialized to: "17. Commands I-L"
    15. title initialized to:
      The info command doesn't care of the working directory if changed by the program
      
    16. type initialized to: "Bug"