From: SourceForge.net <no...@so...> - 2008-07-01 15:40:41
|
Bugs item #1432269, was opened at 2006-02-15 17:14 Message generated for change (Comment added) made by matzek You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1432269&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 37. File System Group: obsolete: 8.4.12 Status: Open Resolution: Rejected Priority: 5 Private: No Submitted By: Matthias Kraft (matzek) >Assigned to: Don Porter (dgp) Summary: [file copy] fails to recursively copy directory if it exists Initial Comment: 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 ---------------------------------------------------------------------- >Comment By: Matthias Kraft (matzek) Date: 2008-07-01 17:40 Message: 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 ---------------------------------------------------------------------- Comment By: Matthias Kraft (matzek) Date: 2006-02-15 22:11 Message: 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 ---------------------------------------------------------------------- Comment By: Vince Darley (vincentdarley) Date: 2006-02-15 21:50 Message: 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. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1432269&group_id=10894 |