瀏覽代碼

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)
 		// If there is a whiteout, then the file was removed
 		if strings.HasPrefix(file, ".wh.") {
-			originalFile := strings.TrimPrefix(file, ".wh.")
+			originalFile := file[len(".wh."):]
 			change.Path = filepath.Join(filepath.Dir(path), originalFile)
 			change.Kind = ChangeDelete
 		} else {