Explorar el Código

如果 tpl 文件存在 便不再进行拷贝,减少idea 的 indexing 的时间

paddy hace 4 años
padre
commit
bbdd2dd6c5
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      client/utils.go

+ 5 - 0
client/utils.go

@@ -102,6 +102,11 @@ func copyFile(src, dest string) (w int64, err error) {
 			}
 		}
 	}
+	_, err = os.Stat(dest)
+	if err == nil {
+		fmt.Print("skip copy ", dest)
+		return
+	}
 	dstFile, err := os.Create(dest)
 	if err != nil {
 		fmt.Println(err.Error())