Artifacts Associated With Ticket 1432269
Ticket change [593f2a2dd3] (rid 117943) by matzek on 2006-02-15 16:14:53:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Hi *, copying directories recursively fails in certain circumstances. Easiest way to reproduce: Have a directory foo/ and do not have a file/directory bar (otherwise it would just be a step less). % file copy -- foo bar -> Now we have a directory bar/ % file copy -- foo bar -> Fine too, we now have a directory bar/foo/ % file copy -- foo bar error copying "foo" to "bar/foo": file already exists -> Which is true, but nonsense as we talk about directories in both cases. It should just detect that directory exists already and continue with copying the stuff below foo/. See POSIX behavior of "cp -R" for reference. Tested on SuSE Linux 10.0. kind regards -- Matthias Kraft
- foundin initialized to: "obsolete: 8.4.12"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "matzek"
- subsystem initialized to: "37. File System"
- title initialized to:
[file copy] fails to recursively copy directory if it exists
- type initialized to: "Bug"
Ticket change [f1c155a1bc] (rid 109411) by vincentdarley on 2006-02-16 03:50:20:
- status changed to: "Closed"
Ticket change [d76ec799c3] (rid 123989) by vincentdarley on 2006-02-16 03:50:21:
- icomment:
Logged In: YES user_id=32170 This is how Tcl's 'file copy' command is documented to behave. If you'd prefer some other behaviour, you can easily enough code up a procedure to do your own kind of copying. You might be interested in what 'file copy -force' does; perhaps closer to your liking? Vince.
- login: "vincentdarley"
- mimetype: "text/plain"
- resolution changed to: "Rejected"
- username: "vincentdarley"
- icomment:
Ticket change [1ab3721aed] (rid 123025) by vincentdarley on 2006-02-16 03:50:22:
- closedate changed to: "2006-02-15T20:50:22"
- closer changed to: "vincentdarley"
Ticket change [2201f449f2] (rid 130682) by matzek on 2006-02-16 04:11:26:
- icomment:
Logged In: YES user_id=330806 Hi Vincent, sorry for reopening, but I may have been a little bit too short in my initial post. You are right -force is documented to override here, but it doesn't. It doesn't matter whether or not -force is specified. Furthermore - but this might be a lack of my english skills - the documentation make a distinction between how directories and files are handled. So I read there that for directories -force isn't needed to get the content recursively copied... OTOH it could also be that I don't really get a grip on the idea of "overwriting a directory"... kind regards -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "matzek"
- icomment:
Ticket change [6b54870dc7] (rid 128314) by matzek on 2008-07-01 22:40:50:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=330806 Originator: YES I still find the behavior surprising, but of course found my way around it. So does it still - if ever - qualify as a bug? If not just close it. Thanks -- Matthias Kraft
- login: "matzek"
- mimetype: "text/plain"
- username: "matzek"