fix LS commnad list root folder error

This commit is contained in:
tickstep 2022-12-24 17:10:07 +08:00
parent 118e521d63
commit 97a22812a2

View File

@ -21,7 +21,6 @@ import (
"github.com/tickstep/aliyunpan/cmder/cmdtable"
"github.com/tickstep/aliyunpan/internal/config"
"github.com/tickstep/library-go/converter"
"github.com/tickstep/library-go/text"
"github.com/urfave/cli"
"os"
"strconv"
@ -141,15 +140,6 @@ func RunLs(driveId, targetPath string, lsOptions *LsOptions,
orderBy aliyunpan.FileOrderBy, orderDirection aliyunpan.FileOrderDirection) {
activeUser := config.Config.ActiveUser()
targetPath = activeUser.PathJoin(driveId, targetPath)
if targetPath[len(targetPath)-1] == '/' {
targetPath = text.Substr(targetPath, 0, len(targetPath)-1)
}
//targetPathInfo, err := activeUser.PanClient().FileInfoByPath(driveId, targetPath)
//if err != nil {
// fmt.Println(err)
// return
//}
files, err := matchPathByShellPattern(driveId, targetPath)
if err != nil {