You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iferr:=configDigest.Validate(); err!=nil { // digest.Digest.Hex() panics on failure, and could possibly result in unexpected paths, so validate explicitly.
312
+
iferr:=configDigest.Validate(); err!=nil { // digest.Digest.Encoded() panics on failure, and could possibly result in unexpected paths, so validate explicitly.
313
313
return"", err
314
314
}
315
-
returnconfigDigest.Hex() +".json", nil
315
+
returnconfigDigest.Encoded() +".json", nil
316
316
}
317
317
318
318
// physicalLayerPath returns a path we choose for storing a layer with the specified digest
319
319
// (the actual path, i.e. a regular file, not a symlink that may be used in the legacy format).
320
320
// NOTE: This is an internal implementation detail, not a format property, and can change
iferr:=layerDigest.Validate(); err!=nil { // digest.Digest.Hex() panics on failure, and could possibly result in unexpected paths, so validate explicitly.
323
+
iferr:=layerDigest.Validate(); err!=nil { // digest.Digest.Encoded() panics on failure, and could possibly result in unexpected paths, so validate explicitly.
324
324
return"", err
325
325
}
326
-
// Note that this can't be e.g. filepath.Join(l.Digest.Hex(), legacyLayerFileName); due to the way
326
+
// Note that this can't be e.g. filepath.Join(l.Digest.Encoded(), legacyLayerFileName); due to the way
327
327
// writeLegacyMetadata constructs layer IDs differently from inputinfo.Digest values (as described
328
328
// inside it), most of the layers would end up in subdirectories alone without any metadata; (docker load)
329
329
// tries to load every subdirectory as an image and fails if the config is missing. So, keep the layers
iferr:=manifestDigest.Validate(); err!=nil { // digest.Digest.Hex() panics on failure, and could possibly result in a path with ../, so validate explicitly.
291
+
iferr:=manifestDigest.Validate(); err!=nil { // digest.Digest.Encoded() panics on failure, and could possibly result in a path with ../, so validate explicitly.
0 commit comments