Fix removing of .chowned
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details

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
1 changed files with 2 additions and 2 deletions

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
err = os.Remove("./.chowned")
if err != nil {
return fmt.Errorf("removing .chowned error: %v", err)
if err != nil && !strings.Contains(err.Error(), "no such file or directory") {
return fmt.Errorf("removing error: %v", err)
}
return nil