mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
LCOW: Write saved manifest.json in Unix paths
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
6b4f989bc2
commit
0a49de4eb5
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"time"
|
||||
|
@ -219,7 +220,11 @@ func (s *saveSession) save(outStream io.Writer) error {
|
|||
}
|
||||
|
||||
for _, l := range imageDescr.layers {
|
||||
layers = append(layers, filepath.Join(l, legacyLayerFileName))
|
||||
// IMPORTANT: We use path, not filepath here to ensure the layers
|
||||
// in the manifest use Unix-style forward-slashes. Otherwise, a
|
||||
// Linux image saved from LCOW won't be able to be imported on
|
||||
// LCOL.
|
||||
layers = append(layers, path.Join(l, legacyLayerFileName))
|
||||
}
|
||||
|
||||
manifest = append(manifest, manifestItem{
|
||||
|
|
Loading…
Add table
Reference in a new issue