From 66476df2bc9fe0d7656eb817147a95491323861b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 1 Nov 2021 21:38:24 +0100 Subject: [PATCH] Fix removing of .chowned --- apps/snapshots.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/snapshots.go b/apps/snapshots.go index c14cf36..2e52890 100644 --- a/apps/snapshots.go +++ b/apps/snapshots.go @@ -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