[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2329: cp -r stops with an exception
Tahoe-LAFS
trac at tahoe-lafs.org
Wed Jan 21 00:16:28 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: | easy release-blocker
Launchpad Bug: |
-------------------------+-------------------------------------------------
Comment (by warner):
From a tahoe-side tree with PARENTCAP, DIRCAP=PARENTCAP/dir, and
FILECAP=PARENTCAP/dir/file.txt, and a local (real) target directory
"local":
* 1.10
* (A) `cp -r PARENTCAP/dir local/` -> `local/file.txt`
* (B) `cp -r DIRCAP local/` -> `local/file.txt`
* (C) `cp -r ALIAS: local/` -> `local/file.txt`
* (D) `cp -r DIRCAP/file.txt local/` -> `local/file.txt`
* (E) `cp -r FILECAP local/` -> "error, you must specify a destination
filename"
* note the target's trailing slash is optional: `local/` and `local`
behave the same way
* trunk (e73d76e)
* (F) `cp -r PARENTCAP/dir local/` -> `local/dir/file.txt`
* (G) `cp -r DIRCAP local/` -> (exception)
* (H) `cp -r ALIAS: local/` -> (exception)
* (I) `cp -r DIRCAP/file.txt local/` -> `local/file.txt`
* (J) `cp -r FILECAP local/` -> "error, you must specify a destination
filename"
#712 fixed F to behave more like regular POSIX `/bin/cp`. I can think of
three ways we might go with case G and H:
* 1: `cp -r DIRCAP local/` should behave like an imaginary `cp -r DIRCAP/*
local/` would do (this is imaginary because we have no tahoe-side globs).
In this example, it'd create `local/file.txt`. This would match what it
did in 1.10 (case B/C), but wouldn't match F. That'd be a shame, because
we generally claim that "PARENTCAP/dir" and "DIRCAP" and "ALIAS:" are all
interchangeable.
* 2: `cp -r DIRCAP local/` would pretend that the source directory was
named after the actual DIRCAP string (the ugly base32 representation), and
create `local/BASE32DIRCAP/file.txt` . Ick. For H we could use the alias
name as a target name, so it'd create `local/ALIASNAME/file.txt`, which is
still lame but at least human-readable.
* 3: `cp -r DIRCAP local/` would complain "you must specify a destination
directory name", like cases E and J. This is somewhat plausible for G, and
looks slightly weird for H.
We don't have enough information to make case G behave like F.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2329#comment:12>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list