mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 16:25:19 +00:00
delta: trim path when computing src files set
The path contains an ending "/" which wouldn't match when we walk dst as it's not there. That had the unpleasant effect of creating empty folders in the destinations
This commit is contained in:
@@ -67,10 +67,17 @@ func ExtractDeltaAdditionsFiles(
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
filesSrc.Set(hdr.Name, "")
|
||||
|
||||
switch hdr.Typeflag {
|
||||
case tar.TypeDir:
|
||||
filesSrc.Set(filepath.Dir(hdr.Name), "")
|
||||
default:
|
||||
filesSrc.Set(hdr.Name, "")
|
||||
}
|
||||
}
|
||||
|
||||
return func(h *tar.Header) (bool, error) {
|
||||
|
||||
fileName := filepath.Join(string(os.PathSeparator), h.Name)
|
||||
_, exists := filesSrc.Get(h.Name)
|
||||
if exists {
|
||||
|
Reference in New Issue
Block a user