Browse code

Fixes #8690

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)

Jessica Frazelle authored on 2014/10/22 08:42:21
Showing 1 changed files
... ...
@@ -72,7 +72,7 @@ func (graph *Graph) restore() error {
72 72
 // FIXME: Implement error subclass instead of looking at the error text
73 73
 // Note: This is the way golang implements os.IsNotExists on Plan9
74 74
 func (graph *Graph) IsNotExist(err error) bool {
75
-	return err != nil && (strings.Contains(err.Error(), "does not exist") || strings.Contains(err.Error(), "No such"))
75
+	return err != nil && (strings.Contains(strings.ToLower(err.Error()), "does not exist") || strings.Contains(strings.ToLower(err.Error()), "no such"))
76 76
 }
77 77
 
78 78
 // Exists returns true if an image is registered at the given id.