mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-22 05:10:28 +01:00
use lstat when checking whether file is a symlink
This commit is contained in:
parent
a0402b407d
commit
0c666d0c88
@ -518,10 +518,10 @@ func (s *script) pruneOldBackups() error {
|
||||
|
||||
var candidates []string
|
||||
for _, candidate := range globMatches {
|
||||
fi, err := os.Stat(candidate)
|
||||
fi, err := os.Lstat(candidate)
|
||||
if err != nil {
|
||||
return fmt.Errorf(
|
||||
"pruneOldBackups: error calling stat on file %s: %w",
|
||||
"pruneOldBackups: error calling Lstat on file %s: %w",
|
||||
candidate,
|
||||
err,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user