mirror of
https://github.com/minio/minio.git
synced 2025-11-07 04:42:56 -05:00
init: Cleanup .minio/tmp directories recursively. Also takes care of cleaning up of parts directory during abortMultipartUpload. (#1532)
This commit is contained in:
committed by
Harshavardhana
parent
3f51dd4fd4
commit
a205aca6d2
@@ -22,6 +22,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
@@ -103,9 +104,13 @@ func retainSlash(s string) string {
|
||||
return strings.TrimSuffix(s, slashSeparator) + slashSeparator
|
||||
}
|
||||
|
||||
// pathJoin - path join.
|
||||
// pathJoin - like path.Join() but retains trailing "/" of the last element
|
||||
func pathJoin(s1 string, s2 string) string {
|
||||
return retainSlash(s1) + s2
|
||||
trailingSlash := ""
|
||||
if strings.HasSuffix(s2, slashSeparator) {
|
||||
trailingSlash = "/"
|
||||
}
|
||||
return path.Join(s1, s2) + trailingSlash
|
||||
}
|
||||
|
||||
// Create an s3 compatible MD5sum for complete multipart transaction.
|
||||
|
||||
Reference in New Issue
Block a user