Skip to content
This repository was archived by the owner on Jul 8, 2020. It is now read-only.

Commit 6384818

Browse files
committed
bug fixed for list with tags
1 parent f049624 commit 6384818

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

cmd.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,21 @@ func (cmd commandList) RequireAuth() bool {
343343

344344
func (cmd commandList) Execute(conn *Conn, param string) {
345345
conn.writeMessage(150, "Opening ASCII mode data connection for file list")
346-
fpath := param
347-
if param == "-l" {
348-
fpath = conn.namePrefix
346+
var fpath string
347+
if len(param) == 0 {
348+
fpath = param
349+
} else {
350+
fields := strings.Fields(param)
351+
for _, field := range fields {
352+
if strings.HasPrefix(field, "-") {
353+
//TODO: currently ignore all the flag
354+
fpath = conn.namePrefix
355+
} else {
356+
fpath = field
357+
}
358+
}
349359
}
360+
350361
path := conn.buildPath(fpath)
351362
info, err := conn.driver.Stat(path)
352363
if err != nil {

0 commit comments

Comments
 (0)