mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-21 08:30:33 +08:00
avoid auto unzip tar.gz files
fix https://github.com/chrislusf/weed-fs/issues/90
This commit is contained in:
@@ -126,7 +126,8 @@ func ParseUpload(r *http.Request) (fileName string, data []byte, mimeType string
|
|||||||
if ext == ".gz" {
|
if ext == ".gz" {
|
||||||
isGzipped = true
|
isGzipped = true
|
||||||
}
|
}
|
||||||
if strings.HasSuffix(fileName, ".gz") {
|
if strings.HasSuffix(fileName, ".gz") &&
|
||||||
|
!strings.HasSuffix(fileName, ".tar.gz") {
|
||||||
fileName = fileName[:len(fileName)-3]
|
fileName = fileName[:len(fileName)-3]
|
||||||
}
|
}
|
||||||
modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64)
|
modifiedTime, _ = strconv.ParseUint(r.FormValue("ts"), 10, 64)
|
||||||
|
Reference in New Issue
Block a user