Skip to content

Commit

Permalink
Merge pull request microsoft#169 from johnstep/ignore-recycle-bin-case
Browse files Browse the repository at this point in the history
Ignore file name case when skipping $Recycle.Bin
  • Loading branch information
John Howard authored May 3, 2018
2 parents ef2b994 + ba4e944 commit 800683a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 800683a

Please # to comment.