경로 문제 수정
This commit is contained in:
@ -85,8 +85,13 @@ func zipLogFiles(req *shared.UploadRequest, start, except string) (string, []str
|
||||
return "", nil, nil
|
||||
}
|
||||
|
||||
for i, file := range matches {
|
||||
file = filepath.ToSlash(file)
|
||||
matches[i] = file
|
||||
}
|
||||
|
||||
root = path.Join(root, path.Dir(req.Filter))
|
||||
zipFileName := path.Join(os.TempDir(), path.Base(matches[0]), ".zip")
|
||||
zipFileName := path.Join(os.TempDir(), path.Base(matches[0])) + ".zip"
|
||||
f, err := os.OpenFile(zipFileName, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0600)
|
||||
|
||||
if err != nil {
|
||||
@ -98,9 +103,7 @@ func zipLogFiles(req *shared.UploadRequest, start, except string) (string, []str
|
||||
defer w.Close()
|
||||
|
||||
oldestFile := ""
|
||||
for i, file := range matches {
|
||||
file = filepath.ToSlash(file)
|
||||
matches[i] = file
|
||||
for _, file := range matches {
|
||||
if file == root {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user