[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2329: cp -r stops with an exception
Tahoe-LAFS
trac at tahoe-lafs.org
Tue Mar 3 20:54:31 UTC 2015
#2329: cp -r stops with an exception
-------------------------+-------------------------------------------------
Reporter: zooko | Owner: warner
Type: defect | Status: assigned
Priority: major | Milestone: 1.10.1
Component: code- | Version: 1.10.0
frontend-cli | Keywords: regression tahoe-cp review-needed
Resolution: | release-blocker
Launchpad Bug: |
-------------------------+-------------------------------------------------
Comment (by warner):
I think I was able to compress the rules above into the following set of
assertions. These are the ones implemented by the code:
* if any source is a directory, must use -r
* if target is missing:
* if source is a single file, target will be a file
* else target will be a directory, so mkdir it
* if there are multiple sources, target must be a dir
* if target is a file, source must be a single file
* if target is directory, sources must be named or a dir
Copying files into files is easy. Copying things into directories requires
looking at the type of each source object:
* target is a directory, so each source must be one of:
* a named file (copied to a new file under the target)
* a named directory (causes a new directory of the same name to be
created under the target, then the contents of the source are copied into
that directory)
* an unnamed directory (the contents of the source are copied into the
target, without a new directory being made)
* If any source is an unnamed file, throw an error, since we have no way
to name the output file.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2329#comment:48>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list