@@ -197,8 +197,8 @@ func getChanges(ctx context.Context, client *containerd.Client, container contai
197
197
return changes , err
198
198
}
199
199
200
- func appendChanges (changes []fs.Change , new fs.Change ) []fs.Change {
201
- newDir , _ := filepath .Split (new .Path )
200
+ func appendChanges (changes []fs.Change , fsChange fs.Change ) []fs.Change {
201
+ newDir , _ := filepath .Split (fsChange .Path )
202
202
newDirPath := filepath .SplitList (newDir )
203
203
204
204
if len (changes ) == 0 {
@@ -208,7 +208,7 @@ func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
208
208
Path : filepath .Join (newDirPath [:i + 1 ]... ),
209
209
})
210
210
}
211
- return append (changes , new )
211
+ return append (changes , fsChange )
212
212
}
213
213
last := changes [len (changes )- 1 ]
214
214
lastDir , _ := filepath .Split (last .Path )
@@ -222,7 +222,7 @@ func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
222
222
Path : filepath .Join (newDirPath [:i + 1 ]... ),
223
223
})
224
224
}
225
- return append (changes , new )
225
+ return append (changes , fsChange )
226
226
}
227
227
228
228
func diffShellComplete (cmd * cobra.Command , args []string , toComplete string ) ([]string , cobra.ShellCompDirective ) {
0 commit comments