فهرست منبع

Merge pull request #794 from dotcloud/780-diff-fix2

- Runtime: remove TrimLeft as it's go1.1
Guillaume J. Charmes 12 سال پیش
والد
کامیت
7a4408f608
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      changes.go

+ 1 - 1
changes.go

@@ -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 {