#457 closed defect

tahoe ls fails if you list a file — at Version 2

Reported by: robk Owned by: robk
Priority: minor Milestone: eventually
Component: code-frontend-cli Version: 1.0.0
Keywords: news-done Cc:
Launchpad Bug:

Description (last modified by zooko)

in experimenting with 'tahoe ls' I found that directories display, but that there's no '-l' or even '-F' indication of what's a file and what's a directory

furthermore, if you 'tahoe ls' a file, tahoe explodes

Traceback (most recent call last):
  File "/Users/robk/trees/tahoe/support/bin/tahoe", line 7, in ?
    sys.exit(
  File "/Users/robk/trees/tahoe/src/allmydata/scripts/runner.py", line 77, in run
    rc = runner(sys.argv[1:])
  File "/Users/robk/trees/tahoe/src/allmydata/scripts/runner.py", line 66, in runner
    rc = cli.dispatch[command](so, stdout, stderr)
  File "/Users/robk/trees/tahoe/src/allmydata/scripts/cli.py", line 235, in list
    stdout, stderr)
  File "/Users/robk/trees/tahoe/src/allmydata/scripts/tahoe_ls.py", line 55, in list
    childtype = child[0]
KeyError: 0

when it tries to unpack the json packed structure of the 'specified directory' i.e. tahoe ls assumes only directories will be named, and fails if a file is named, but provides no indication either way.

Change History (2)

comment:1 Changed at 2008-06-11T07:04:56Z by robk

  • Owner set to robk
  • Priority changed from major to minor

duh. ls has -l and -F. missed that.

so simply a little cleanup in the handling of ls of files

comment:2 Changed at 2009-06-30T18:08:13Z by zooko

  • Description modified (diff)
  • Milestone changed from 1.5.0 to eventually
Note: See TracTickets for help on using tickets.