Skip to content

Commit

Permalink
Correctly detect os.IsNotExist error; ref pterodactyl/panel#2438
Browse files Browse the repository at this point in the history
  • Loading branch information
DaneEveritt committed Oct 4, 2020
1 parent 6bc8b1a commit d9109cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/archiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (a *Archiver) Archive() error {
// DeleteIfExists deletes the archive if it exists.
func (a *Archiver) DeleteIfExists() error {
stat, err := a.Stat()
if err != nil && !os.IsNotExist(err) {
if err != nil && !errors.Is(err, os.ErrNotExist) {
return err
}

Expand Down

0 comments on commit d9109cb

Please sign in to comment.