Skip to content
Tcl Source Code History Of Ticket 82049f96f841214b
Login

History Of Ticket 82049f96f841214b

Artifacts Associated With Ticket 82049f96f841214b

  1. Ticket change [cbfcf5d2d4] (rid 167680) by anonymous on 2018-11-21 14:06:54:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      Tcl's "file copy" functionality attempts to copy a directory into itself.  Like:
      
      $ mkdir 1
      $ mkdir 1/2
      $ tclsh
      % file copy 1 1/2
      error copying "1" to "1/2/1": "1/2/1/2/1/2[long string deleted]": file name too long
      
      Other, similar programs seem to check the inodes of the path to ensure directories don't get copied into themselves:
      
      $ mkdir 1
      $ mkdir 1/2
      $ cp -r 1 1/2
      cp: cannot copy a directory, '1', into itself, '1/2/1'
      
    5. foundin initialized to: "8.6"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "anonymous"
    13. subsystem initialized to: "37. File System"
    14. title initialized to: "file copy attempts to copy directory into itself"
    15. type initialized to: "Bug"
  2. Ticket change [433c923ce3] (rid 258536) by serhiy.storchaka on 2026-10-17 10:53:34:

    1. icomment:
      The deep tree that <nowiki>[file copy 1 1/2]</nowiki> leaves behind cannot be removed with <nowiki>[file delete -force]</nowiki> either: [daba77ae1d].
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [616bbebb7e] (rid 259336) by serhiy.storchaka on 2026-10-19 18:54:12:

    1. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
    2. icomment:
      Still present in 8.6, 9.0 and 9.1: <nowiki>[file copy 1 1/2]</nowiki> (and <nowiki>[file copy -force d d]</nowiki>) copies until the path is too long, and leaves a tree that <nowiki>[file delete -force]</nowiki> cannot remove ([daba77ae1d]).
      
      Proposed fix in branch [/timeline?r=copy-into-itself|copy-into-itself], together with [875545270d]: copying a directory into itself is now an error, "trying to copy a directory into itself". The normalized paths are compared, so links are handled, and so is a different letter case on Windows (checked under Wine). If the target's parent does not exist, the old error is kept. Tests fCmd-21.13 and 21.14.
      
    3. login: "serhiy.storchaka"
    4. mimetype: "text/x-fossil-wiki"
  4. Ticket change [79494e41b2] (rid 259815) by dgp on 2026-10-21 18:29:26:

    1. icomment:
      
      Just want to add a caution that Tcl's virtual filesystems
      and ability to mount anywhere undermines a lot of 
      "common sense" reasoning about the relationship between
      directories.  Be sure to consider all the possibilities
      and not limit your analysis to the assumption that all
      paths are inside a single filesystem.
      
    2. login: "dgp"
    3. mimetype: "text/plain"