🚚 Move io related functions to fs internal package

This commit is contained in:
2024-12-28 14:07:53 +08:00
parent 99dd7f55e0
commit dda85eae98
7 changed files with 26 additions and 18 deletions

View File

@@ -17,6 +17,7 @@ import (
localCache "git.solsynth.dev/hypernet/paperclip/pkg/internal/cache"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/database"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/fs"
"git.solsynth.dev/hypernet/paperclip/pkg/internal/models"
"github.com/google/uuid"
@@ -218,7 +219,7 @@ func DeleteAttachment(item models.Attachment) error {
tx.Commit()
if dat.RefCount == 0 {
go DeleteFile(dat)
go fs.DeleteFile(dat)
}
return nil