Fix removing of .chowned
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
Adam Štrauch 2021-11-01 21:38:24 +01:00
parent 564e9ec4f1
commit 66476df2bc
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -226,8 +226,8 @@ func (s *SnapshotProcessor) RestoreSnapshot(key string, newAppName string) error
// remove .chowned file to tell the container to setup ownership of the files again // remove .chowned file to tell the container to setup ownership of the files again
err = os.Remove("./.chowned") err = os.Remove("./.chowned")
if err != nil { if err != nil && !strings.Contains(err.Error(), "no such file or directory") {
return fmt.Errorf("removing .chowned error: %v", err) return fmt.Errorf("removing error: %v", err)
} }
return nil return nil