mirror of https://github.com/Xhofe/alist
🐛 fix upload delete cache
parent
d255ff4fd0
commit
e7ba289d06
|
@ -251,7 +251,7 @@ func (driver FTP) Upload(file *model.FileStream, account *model.Account) error {
|
||||||
defer func() { _ = conn.Quit() }()
|
defer func() { _ = conn.Quit() }()
|
||||||
err = conn.Stor(realPath, file)
|
err = conn.Stor(realPath, file)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
_ = base.DeleteCache(utils.Dir(file.ParentPath), account)
|
_ = base.DeleteCache(file.ParentPath, account)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,7 +290,7 @@ func (driver Onedrive) Upload(file *model.FileStream, account *model.Account) er
|
||||||
err = driver.UploadBig(file, account)
|
err = driver.UploadBig(file, account)
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
_ = base.DeleteCache(utils.Dir(file.ParentPath), account)
|
_ = base.DeleteCache(file.ParentPath, account)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,7 +189,7 @@ func (driver WebDav) Upload(file *model.FileStream, account *model.Account) erro
|
||||||
path := utils.Join(file.ParentPath, file.Name)
|
path := utils.Join(file.ParentPath, file.Name)
|
||||||
err := c.WriteStream(driver.WebDavPath(path), file, 0644)
|
err := c.WriteStream(driver.WebDavPath(path), file, 0644)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
_ = base.DeleteCache(utils.Dir(file.ParentPath), account)
|
_ = base.DeleteCache(file.ParentPath, account)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue