Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup & remove prefixFile from public api #34

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions backupfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,11 @@ func (fsys *BackupFS) tryRemoveBackup(name string) (err error) {
}
}()
// remove file/symlink
return fsys.backup.Remove(name)
err := fsys.backup.Remove(name)
if err != nil {
return err
}
return nil
}

dirs := make([]string, 0)
Expand Down Expand Up @@ -548,7 +552,11 @@ func (fsys *BackupFS) tryRemoveBackup(name string) (err error) {
}

// delete files
return fsys.backup.Remove(path)
err = fsys.backup.Remove(path)
if err != nil {
return err
}
return nil
})
if err != nil {
return err
Expand Down Expand Up @@ -715,7 +723,11 @@ func (fsys *BackupFS) OpenFile(name string, flag int, perm fs.FileMode) (File, e

if flag == os.O_RDONLY {
// in read only mode the perm is not used.
return fsys.base.OpenFile(name, os.O_RDONLY, 0)
f, err := fsys.base.OpenFile(name, os.O_RDONLY, 0)
if err != nil {
return nil, &os.PathError{Op: "open", Path: name, Err: fmt.Errorf("open failed: %w", err)}
}
return f, nil
}

// not read only opening -> backup
Expand Down
102 changes: 0 additions & 102 deletions hidden_utils.go

This file was deleted.

Loading
Loading