From a0402b407ddb8d1ddfd928e3a1c641ffebed0757 Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Wed, 3 Nov 2021 18:03:44 +0100 Subject: [PATCH] fix fileinfo mode comparison when checking for symlinks --- cmd/backup/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/backup/main.go b/cmd/backup/main.go index 1a0634c..a902b84 100644 --- a/cmd/backup/main.go +++ b/cmd/backup/main.go @@ -526,7 +526,8 @@ func (s *script) pruneOldBackups() error { err, ) } - if fi.Mode() != os.ModeSymlink { + + if fi.Mode()&os.ModeSymlink != os.ModeSymlink { candidates = append(candidates, candidate) } }