[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2329: cp -r stops with an exception

Tahoe-LAFS trac at tahoe-lafs.org
Tue Feb 24 10:35:54 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):

 Ok, updates:

 * sources are NAMEDDIR, UNNAMEDDIR, NAMEDFILE, UNNAMEDFILE
 * targets are DIR, FILE, or MISSING
 * single-source cases:
  * cp FILE TO-FILE: replace the contents
  * cp FILE TO-MISSING: create the target file
  * cp NAMEDFILE TO-DIR: create/replace TO-DIR/filename
  * cp UNNAMEDFILE TO-DIR: error: need a name
  * (cp -r FILE X: behave same as without -r)
  * cp DIR X: error: must use -r if any source is a directory
  * cp -r DIR TO-FILE: error, directories must be copied into other
 directories
  * cp -r NAMEDDIR TO-DIR: create TO-DIR/NAME/ and fill with contents
  * cp -r NAMEDDIR TO-MISSING: same: TO-MISSING/NAME/ filled with contents
  * cp -r UNNAMEDDIR TO-DIR: copy source/* into TO/*
  * cp -r UNNAMEDDIR TO-MISSING: same: mkdir TO-MISSING, fill with contents
 * multiple-source cases:
  * cp X.. TO-FILE: error: many-to-one requires target is a directory
  * cp NAMEDFILES.. TO-DIR: create/replace TO-DIR/filenames
  * cp NAMEDFILES.. TO-MISSING: mkdir, then treat like TO-DIR
  * cp SOMEUNNAMEDFILES.. X: error: need a name
   * (cp UNNAMEDFILE X with 1 source is ok, but not if there are multiple
 sources)
  * cp FILESDIRS.. X: error: must use -r if any source is a directory
  * cp -r X.. TO-MISSING: mkdir target, then treat as TO-DIR
  * cp -r X.. TO-DIR: for each X:
   * if X is UNNAMEDFILE: error, need a name, whole command fails
   * if X is NAMEDFILE: create/replace TO-DIR/name
   * if X is UNNAMEDDIR: copy source/* into TO/*, like with single-source
   * if X is NAMEDDIR: copy source/* into TO/name/*

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2329#comment:43>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list