Correctly detect os.IsNotExist error; ref pterodactyl/panel#2438

This commit is contained in:
Dane Everitt 2020-10-03 19:09:12 -07:00
parent 6bc8b1a567
commit d9109cbf5a
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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
}