truncate prefixes above the selected level to make the download layout flat (#2987)
This commit is contained in:
committed by
GitHub
parent
3275b6a6d8
commit
495b0f0068
@@ -722,7 +722,10 @@ func getMultipleFilesDownloadResponse(session *models.Principal, params objectAp
|
||||
continue
|
||||
}
|
||||
|
||||
f, err := addToZip(dObj, objectData.LastModified)
|
||||
prefixes := strings.Split(dObj, "/")
|
||||
// truncate upper level prefixes to make the download as flat at the current level.
|
||||
objectName := prefixes[len(prefixes)-1]
|
||||
f, err := addToZip(objectName, objectData.LastModified)
|
||||
if err != nil {
|
||||
// Ignore errors, move to next
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user