Use ObjectsAll and ContainersAll to see everything

This commit is contained in:
Nick Craig-Wood 2012-11-28 23:40:09 +00:00
parent 31745ac13b
commit ba24b84396
2 changed files with 12 additions and 6 deletions

View File

@ -18,3 +18,9 @@ FIXME progress meter would be nice! Do this by wrapping the Reader with a progre
Do bandwidth limit by wrapping the Reader too
Could have an integrity check mode where we check the MD5sums of the local vs the remote
Some stats would be nice!
Windows paths? Do we need to translate / and \?
Make swift timeouts be settable

View File

@ -43,7 +43,7 @@ type FsObject struct {
type FsObjects []FsObject
// Write debuging output for this FsObject
func (fs *FsObject) Debugf(text string, args... interface{}) {
func (fs *FsObject) Debugf(text string, args ...interface{}) {
out := fmt.Sprintf(text, args...)
log.Printf("%s: %s", fs.rel, out)
}
@ -231,7 +231,7 @@ func upload(c *swift.Connection, root, container string) {
// Lists the containers
func listContainers(c *swift.Connection) {
containers, err := c.Containers(nil)
containers, err := c.ContainersAll(nil)
if err != nil {
log.Fatalf("Couldn't list containers: %s", err)
}
@ -242,8 +242,8 @@ func listContainers(c *swift.Connection) {
// Lists files in a container
func list(c *swift.Connection, container string) {
//objects, err := c.Objects(container, &swift.ObjectsOpts{Prefix: "", Delimiter: '/'})
objects, err := c.Objects(container, nil)
//objects, err := c.ObjectsAll(container, &swift.ObjectsOpts{Prefix: "", Delimiter: '/'})
objects, err := c.ObjectsAll(container, nil)
if err != nil {
log.Fatalf("Couldn't read container %q: %s", container, err)
}