mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix Path corruption in 'docker diff'
This commit is contained in:
parent
e42eb7fa8c
commit
e16c93486d
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ func Changes(layers []string, rw string) ([]Change, error) {
|
||||||
file := filepath.Base(path)
|
file := filepath.Base(path)
|
||||||
// If there is a whiteout, then the file was removed
|
// If there is a whiteout, then the file was removed
|
||||||
if strings.HasPrefix(file, ".wh.") {
|
if strings.HasPrefix(file, ".wh.") {
|
||||||
originalFile := strings.TrimLeft(file, ".wh.")
|
originalFile := strings.TrimPrefix(file, ".wh.")
|
||||||
change.Path = filepath.Join(filepath.Dir(path), originalFile)
|
change.Path = filepath.Join(filepath.Dir(path), originalFile)
|
||||||
change.Kind = ChangeDelete
|
change.Kind = ChangeDelete
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue