mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 04:31:28 +00:00
fix Path corruption in 'docker diff'
This commit is contained in:
+1
-1
@@ -65,7 +65,7 @@ func Changes(layers []string, rw string) ([]Change, error) {
|
||||
file := filepath.Base(path)
|
||||
// If there is a whiteout, then the file was removed
|
||||
if strings.HasPrefix(file, ".wh.") {
|
||||
originalFile := strings.TrimLeft(file, ".wh.")
|
||||
originalFile := strings.TrimPrefix(file, ".wh.")
|
||||
change.Path = filepath.Join(filepath.Dir(path), originalFile)
|
||||
change.Kind = ChangeDelete
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user