github.com/openflowlabs/storage@v1.12.13/pkg/chrootarchive/archive_windows.go (about) 1 package chrootarchive 2 3 import ( 4 "io" 5 6 "github.com/containers/storage/pkg/archive" 7 "github.com/containers/storage/pkg/longpath" 8 ) 9 10 // chroot is not supported by Windows 11 func chroot(path string) error { 12 return nil 13 } 14 15 func invokeUnpack(decompressedArchive io.ReadCloser, 16 dest string, 17 options *archive.TarOptions, root string) error { 18 // Windows is different to Linux here because Windows does not support 19 // chroot. Hence there is no point sandboxing a chrooted process to 20 // do the unpack. We call inline instead within the daemon process. 21 return archive.Unpack(decompressedArchive, longpath.AddPrefix(dest), options) 22 } 23 24 func invokePack(srcPath string, options *archive.TarOptions, root string) (io.ReadCloser, error) { 25 // Windows is different to Linux here because Windows does not support 26 // chroot. Hence there is no point sandboxing a chrooted process to 27 // do the pack. We call inline instead within the daemon process. 28 return archive.TarWithOptions(srcPath, options) 29 }