Simplify dirArchive by using os.dirFS and have Archive.Open return fs.File

This commit is contained in:
Philipp Wolfer 2025-05-24 02:20:07 +02:00
parent 0231331209
commit 975e208254
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
2 changed files with 20 additions and 22 deletions

View file

@ -63,7 +63,7 @@ func (a *ExportArchive) Close() error {
// Read the user information from the archive.
func (a *ExportArchive) UserInfo() (UserInfo, error) {
f, err := a.backend.OpenFile("user.json")
f, err := a.backend.Open("user.json")
if err != nil {
return UserInfo{}, err
}