File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,19 +148,20 @@ func GetAccountVirtualFilesByPath(prefix string) []driver.FileInfo {
148148 prefix = utils .StandardizationPath (prefix )
149149 set := make (map [string ]interface {})
150150 for _ , v := range accounts {
151+ // TODO should save a balanced account
151152 // balance account
152153 if utils .IsBalance (v .GetAccount ().VirtualPath ) {
153154 continue
154155 }
155- full := v .GetAccount ().VirtualPath
156- if len (full ) <= len (prefix ) {
156+ virtualPath := v .GetAccount ().VirtualPath
157+ if len (virtualPath ) <= len (prefix ) {
157158 continue
158159 }
159160 // not prefixed with `prefix`
160- if ! strings .HasPrefix (full , prefix + "/" ) && prefix != "/" {
161+ if ! strings .HasPrefix (virtualPath , prefix + "/" ) && prefix != "/" {
161162 continue
162163 }
163- name := strings .Split (strings .TrimPrefix (full , prefix ), "/" )[0 ]
164+ name := strings .Split (strings .TrimPrefix (virtualPath , prefix ), "/" )[1 ]
164165 if _ , ok := set [name ]; ok {
165166 continue
166167 }
You can’t perform that action at this time.
0 commit comments