@@ -197,8 +197,8 @@ func getChanges(ctx context.Context, client *containerd.Client, container contai
197197	return  changes , err 
198198}
199199
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 )
202202	newDirPath  :=  filepath .SplitList (newDir )
203203
204204	if  len (changes ) ==  0  {
@@ -208,7 +208,7 @@ func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
208208				Path : filepath .Join (newDirPath [:i + 1 ]... ),
209209			})
210210		}
211- 		return  append (changes , new )
211+ 		return  append (changes , fsChange )
212212	}
213213	last  :=  changes [len (changes )- 1 ]
214214	lastDir , _  :=  filepath .Split (last .Path )
@@ -222,7 +222,7 @@ func appendChanges(changes []fs.Change, new fs.Change) []fs.Change {
222222			Path : filepath .Join (newDirPath [:i + 1 ]... ),
223223		})
224224	}
225- 	return  append (changes , new )
225+ 	return  append (changes , fsChange )
226226}
227227
228228func  diffShellComplete (cmd  * cobra.Command , args  []string , toComplete  string ) ([]string , cobra.ShellCompDirective ) {
0 commit comments