소스 검색

命名修复

pixel 4 년 전
부모
커밋
a5b37768fb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      server/utils/zipfiles.go

+ 1 - 1
server/utils/zipfiles.go

@@ -49,7 +49,7 @@ func ZipFiles(filename string, files []string, oldForm, newForm string) error {
 			}
 
 			// 使用上面的FileInforHeader() 就可以把文件保存的路径替换成我们自己想要的了,如下面
-			header.Name = strings.Replace(file, oldform, newform, -1)
+			header.Name = strings.Replace(file, oldForm, newForm, -1)
 
 			// 优化压缩
 			// 更多参考see http://golang.org/pkg/archive/zip/#pkg-constants