From cad8eb40eb3c93ba817c9d50daf0e62b1816fc2a Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Tue, 26 Jul 2016 11:57:09 -0700 Subject: [PATCH] Fix files in subdirectories creating bad whiteout Closes #23863 Signed-off-by: Derek McGowan (github: dmcgowan) --- archive/archive_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archive/archive_linux.go b/archive/archive_linux.go index f2a5f0b..e944ca2 100644 --- a/archive/archive_linux.go +++ b/archive/archive_linux.go @@ -23,7 +23,8 @@ func (overlayWhiteoutConverter) ConvertWrite(hdr *tar.Header, path string, fi os // convert whiteouts to AUFS format if fi.Mode()&os.ModeCharDevice != 0 && hdr.Devmajor == 0 && hdr.Devminor == 0 { // we just rename the file and make it normal - hdr.Name = WhiteoutPrefix + hdr.Name + dir, filename := filepath.Split(hdr.Name) + hdr.Name = filepath.Join(dir, WhiteoutPrefix+filename) hdr.Mode = 0600 hdr.Typeflag = tar.TypeReg hdr.Size = 0