Fix duplicate directories entries on metadata change
Currently directory changes are not added to the list of included directories, allowing those directories to receive duplicate entries where there is both a metadata change to the directory and a change to a file under that directory. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -583,6 +583,9 @@ func (cw *changeWriter) includeParents(hdr *tar.Header) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
if hdr.Typeflag == tar.TypeDir {
|
||||
cw.addedDirs[name] = struct{}{}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user