Artifacts Associated With Ticket 82049f96f8
Ticket change [cbfcf5d2d4] (rid 167680) by anonymous on 2018-11-21 14:06:54:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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'
- foundin initialized to: "8.6"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "37. File System"
- title initialized to: "file copy attempts to copy directory into itself"
- type initialized to: "Bug"
Ticket change [433c923ce3] (rid 258536) by serhiy.storchaka on 2026-10-17 10:53:34:
- 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].
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [616bbebb7e] (rid 259336) by serhiy.storchaka on 2026-10-19 18:54:12:
- foundin changed to: "8.6.18, 9.0.5, 9.1.0"
- 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.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
Ticket change [79494e41b2] (rid 259815) by dgp on 2026-10-21 18:29:26:
- 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.
- login: "dgp"
- mimetype: "text/plain"
- icomment: