client: dry
This commit is contained in:
parent
b12f1c1b33
commit
8f99657223
@ -92,15 +92,14 @@ func (c *Client) ReadDir(path string) ([]os.FileInfo, error) {
|
|||||||
f.name = p.Name
|
f.name = p.Name
|
||||||
}
|
}
|
||||||
f.path = path + f.name
|
f.path = path + f.name
|
||||||
|
f.modified = parseModified(&p.Modified)
|
||||||
|
|
||||||
if p.Type.Local == "collection" {
|
if p.Type.Local == "collection" {
|
||||||
f.path += "/"
|
f.path += "/"
|
||||||
f.size = 0
|
f.size = 0
|
||||||
f.modified = parseModified(&p.Modified)
|
|
||||||
f.isdir = true
|
f.isdir = true
|
||||||
} else {
|
} else {
|
||||||
f.size = parseInt64(&p.Size)
|
f.size = parseInt64(&p.Size)
|
||||||
f.modified = parseModified(&p.Modified)
|
|
||||||
f.isdir = false
|
f.isdir = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user