mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
add return parameter name for function Cas of gtype;improve Response.Redirect* functions by adding optional parameter code
This commit is contained in:
@ -72,11 +72,11 @@ func doZipPathWriter(path string, zipWriter *zip.Writer, prefix ...string) error
|
||||
headerPrefix = prefix[0]
|
||||
}
|
||||
headerPrefix = strings.TrimRight(headerPrefix, "\\/")
|
||||
if gfile.IsDir(path) {
|
||||
if len(headerPrefix) > 0 {
|
||||
headerPrefix += "/"
|
||||
}
|
||||
headerPrefix = headerPrefix + gfile.Basename(path)
|
||||
if len(headerPrefix) > 0 && gfile.IsDir(path) {
|
||||
headerPrefix += "/"
|
||||
}
|
||||
if headerPrefix == "" {
|
||||
headerPrefix = gfile.Basename(path)
|
||||
}
|
||||
headerPrefix = strings.Replace(headerPrefix, "//", "/", -1)
|
||||
for _, file := range files {
|
||||
|
||||
Reference in New Issue
Block a user