Browse Source

dirs

tags/v1.21.11.2^2
lewis 4 years ago
parent
commit
2b564a7a34
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      modules/storage/obs.go

+ 12
- 2
modules/storage/obs.go View File

@@ -187,10 +187,19 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) {
var isDir bool
var fileName,nextParentDir string
if strings.HasSuffix(val.Key, "/") {
//dirs in next level dir
if len(str1) - len(strPrefix) > 2 {
continue
}
fileName = str1[len(str1)-2]
isDir = true
nextParentDir = fileName
if fileName == parentDir || (fileName + "/") == setting.OutPutPath {
if parentDir == "" {
nextParentDir = fileName
} else {
nextParentDir = parentDir + "/" + fileName
}

if fileName == strPrefix[len(strPrefix)-1] || (fileName + "/") == setting.OutPutPath {
continue
}
} else {
@@ -200,6 +209,7 @@ func GetObsListObject(jobName, parentDir string) ([]FileInfo, error) {
}
fileName = str1[len(str1)-1]
isDir = false
nextParentDir = parentDir
}

fileInfo := FileInfo{


Loading…
Cancel
Save