File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,8 +185,8 @@ func GetStorageVirtualFilesByPath(prefix string) []model.Obj {
185185 return storages [i ].GetStorage ().Index < storages [j ].GetStorage ().Index
186186 })
187187 prefix = utils .StandardizePath (prefix )
188- if prefix = = "/" {
189- prefix = ""
188+ if prefix ! = "/" {
189+ prefix + = "/ "
190190 }
191191 set := make (map [string ]interface {})
192192 for _ , v := range storages {
@@ -200,10 +200,10 @@ func GetStorageVirtualFilesByPath(prefix string) []model.Obj {
200200 continue
201201 }
202202 // not prefixed with `prefix`
203- if ! strings .HasPrefix (virtualPath , prefix + "/" ) {
203+ if ! strings .HasPrefix (virtualPath , prefix ) {
204204 continue
205205 }
206- name := strings .Split (strings .TrimPrefix (virtualPath , prefix ), "/" )[1 ]
206+ name := strings .Split (strings .TrimPrefix (virtualPath , prefix ), "/" )[0 ]
207207 if _ , ok := set [name ]; ok {
208208 continue
209209 }
You can’t perform that action at this time.
0 commit comments