forked from forgejo/forgejo
Add default storage configurations (#12813)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
4c6ac08182
commit
3878e985b6
19 changed files with 459 additions and 185 deletions
|
@ -70,6 +70,10 @@ func RemoveAllWithNotice(title, path string) {
|
|||
// RemoveStorageWithNotice removes a file from the storage and
|
||||
// creates a system notice when error occurs.
|
||||
func RemoveStorageWithNotice(bucket storage.ObjectStorage, title, path string) {
|
||||
removeStorageWithNotice(x, bucket, title, path)
|
||||
}
|
||||
|
||||
func removeStorageWithNotice(e Engine, bucket storage.ObjectStorage, title, path string) {
|
||||
if err := bucket.Delete(path); err != nil {
|
||||
desc := fmt.Sprintf("%s [%s]: %v", title, path, err)
|
||||
log.Warn(title+" [%s]: %v", path, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue