1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

remove TrimLeft as it's go1.1

This commit is contained in:
Victor Vieux 2013-06-03 17:25:51 +00:00
parent 070923b14f
commit 854039b6ba

View file

@ -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.TrimPrefix(file, ".wh.") originalFile := file[len(".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 {