Commit f652079c by usual2970

静态资源钩子调整

parent cf5c0880
......@@ -44,12 +44,16 @@ func (c *GitController) Hook() {
if len(upList)>0{
for _,v:=range upList{
fd,_:=os.Open(repoPath+v[1])
fd,err:=os.Open(repoPath+v[1])
if err!=nil{
continue
}
_,err:=up.Put("/"+v[1],fd,false,nil)
if err!=nil{
fmt.Println(err)
}
fmt.Println(v[1])
fd.Close()
}
}
......@@ -58,9 +62,13 @@ func (c *GitController) Hook() {
if len(crList)>0{
for _,cr:=range crList{
fd,_:=os.Open(repoPath+cr[1])
fd,err:=os.Open(repoPath+cr[1])
if err!=nil{
continue
}
up.Put("/"+cr[1],fd,false,nil)
fmt.Println(cr[1])
fd.Close()
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment