client: dry

This commit is contained in:
Christoph Polcin 2015-12-09 10:02:37 +01:00
parent b12f1c1b33
commit 8f99657223

View File

@ -92,15 +92,14 @@ func (c *Client) ReadDir(path string) ([]os.FileInfo, error) {
f.name = p.Name
}
f.path = path + f.name
f.modified = parseModified(&p.Modified)
if p.Type.Local == "collection" {
f.path += "/"
f.size = 0
f.modified = parseModified(&p.Modified)
f.isdir = true
} else {
f.size = parseInt64(&p.Size)
f.modified = parseModified(&p.Modified)
f.isdir = false
}