From ba4e94420e46b89896f6acad894171de517f834a Mon Sep 17 00:00:00 2001 From: John Stephens Date: Thu, 3 May 2018 07:17:54 -0700 Subject: [PATCH] Ignore file name case when skipping $Recycle.Bin Signed-off-by: John Stephens --- legacy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy.go b/legacy.go index 5f009e5173..0b23b6c4d0 100644 --- a/legacy.go +++ b/legacy.go @@ -127,7 +127,7 @@ func (r *legacyLayerReader) walkUntilCancelled() error { // UTF16 to UTF8 in files which are left in the recycle bin. Os.Lstat // which is called by filepath.Walk will fail when a filename contains // unicode characters. Skip the recycle bin regardless which is goodness. - if path == filepath.Join(r.root, `Files\$Recycle.Bin`) && info.IsDir() { + if strings.EqualFold(path, filepath.Join(r.root, `Files\$Recycle.Bin`)) && info.IsDir() { return filepath.SkipDir }