Changes between Version 2 and Version 3 of Ticket #2027


Ignore:
Timestamp:
2013-07-17T16:20:20Z (11 years ago)
Author:
daira
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2027 – Description

    v2 v3  
    11When copying a file from the top level of a directory node using the CLI, tahoe requires a file name to be specified.
    22
    3 Ex: {{{tahoe cp tahoe:test.jpg ~}}} fails while {{{tahoe cp tahoe:test.jpg ~/test.jpg }}} succeeds.
     3Ex: {{{tahoe cp tahoe:test.jpg ~}}} fails with the following assertion traceback, while {{{tahoe cp tahoe:test.jpg ~/test.jpg }}} succeeds.
     4
     5{{{
     6Marks-MacBook-Pro-5:tahoe-fork markberger$ bin/tahoe cp tahoe:Seattle.jpg ~
     7Traceback (most recent call last):
     8  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/runner.py", line 156, in run
     9    rc = runner(sys.argv[1:], install_node_control=install_node_control)
     10  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/runner.py", line 141, in runner
     11    rc = cli.dispatch[command](so)
     12  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/cli.py", line 551, in cp
     13    rc = tahoe_cp.copy(options)
     14  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 770, in copy
     15    return Copier().do_copy(options)
     16  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 451, in do_copy
     17    status = self.try_copy()
     18  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 512, in try_copy
     19    return self.copy_to_directory(sources, target)
     20  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 672, in copy_to_directory
     21    self.copy_files_to_target(self.targetmap[target], target)
     22  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 703, in copy_files_to_target
     23    self.copy_file_into(source, name, target)
     24  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 748, in copy_file_into
     25    target.put_file(name, f)
     26  File "/Users/markberger/Code/tahoe-fork/src/allmydata/scripts/tahoe_cp.py", line 156, in put_file
     27    precondition(isinstance(name, unicode), name)
     28  File "/Users/markberger/Code/tahoe-fork/src/allmydata/util/assertutil.py", line 39, in precondition
     29    raise AssertionError, "".join(msgbuf)
     30AssertionError: precondition: 'Seattle.jpg' <type 'str'>
     31}}}
    432
    533However, when a file is copied from a subdirectory to the local disk without a specified file name, the download will succeed.