mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 13:03:09 +08:00
chore: clear parent folder cache after upload
This commit is contained in:
@@ -214,5 +214,11 @@ func Put(ctx context.Context, account driver.Driver, dstDirPath string, file mod
|
||||
if up == nil {
|
||||
up = func(p int) {}
|
||||
}
|
||||
return account.Put(ctx, parentDir, file, up)
|
||||
err = account.Put(ctx, parentDir, file, up)
|
||||
if err == nil {
|
||||
// clear cache
|
||||
key := stdpath.Join(account.GetAccount().VirtualPath, dstDirPath)
|
||||
filesCache.Del(key)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user