From d23e67970d3c5cf67c2bb40c50a64f1e1ed11354 Mon Sep 17 00:00:00 2001 From: Christian Goll Date: Thu, 5 Oct 2023 15:28:52 +0200 Subject: [PATCH] Support importing container with symlinked shell Fixes #797 Signed-off-by: Christian Goll --- CHANGELOG.md | 1 + internal/pkg/util/util.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c7d060a..3c6287b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -115,6 +115,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - only write IPMI if write is true - Don't show an error if image files for containers can't be found. #933 - Make configured paths available in overlays as `.Path` #960 +- Support importing containers with symlinked `/bin/sh` #797 ## [4.4.0] 2023-01-18 diff --git a/internal/pkg/util/util.go b/internal/pkg/util/util.go index 6ad445cb..2381e77b 100644 --- a/internal/pkg/util/util.go +++ b/internal/pkg/util/util.go @@ -177,7 +177,7 @@ func IsFile(path string) bool { return false } - if stat, err := os.Stat(path); err == nil && !stat.IsDir() { + if stat, err := os.Lstat(path); err == nil && !stat.IsDir() { return true } return false