Update continuity
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
27
vendor/github.com/containerd/continuity/fs/fstest/compare_windows.go
generated
vendored
27
vendor/github.com/containerd/continuity/fs/fstest/compare_windows.go
generated
vendored
@@ -17,14 +17,21 @@
|
||||
package fstest
|
||||
|
||||
var metadataFiles = map[string]bool{
|
||||
"\\System Volume Information": true,
|
||||
"\\WcSandboxState": true,
|
||||
"\\Windows": true,
|
||||
"\\Windows\\System32": true,
|
||||
"\\Windows\\System32\\config": true,
|
||||
"\\Windows\\System32\\config\\DEFAULT": true,
|
||||
"\\Windows\\System32\\config\\SAM": true,
|
||||
"\\Windows\\System32\\config\\SECURITY": true,
|
||||
"\\Windows\\System32\\config\\SOFTWARE": true,
|
||||
"\\Windows\\System32\\config\\SYSTEM": true,
|
||||
"\\System Volume Information": true,
|
||||
"\\WcSandboxState": true,
|
||||
"\\WcSandboxState\\Hives": true,
|
||||
"\\WcSandboxState\\Hives\\DefaultUser_Delta": true,
|
||||
"\\WcSandboxState\\Hives\\Sam_Delta": true,
|
||||
"\\WcSandboxState\\Hives\\Security_Delta": true,
|
||||
"\\WcSandboxState\\Hives\\Software_Delta": true,
|
||||
"\\WcSandboxState\\Hives\\System_Delta": true,
|
||||
"\\WcSandboxState\\initialized": true,
|
||||
"\\Windows": true,
|
||||
"\\Windows\\System32": true,
|
||||
"\\Windows\\System32\\config": true,
|
||||
"\\Windows\\System32\\config\\DEFAULT": true,
|
||||
"\\Windows\\System32\\config\\SAM": true,
|
||||
"\\Windows\\System32\\config\\SECURITY": true,
|
||||
"\\Windows\\System32\\config\\SOFTWARE": true,
|
||||
"\\Windows\\System32\\config\\SYSTEM": true,
|
||||
}
|
||||
|
||||
16
vendor/github.com/containerd/continuity/ioutils.go
generated
vendored
16
vendor/github.com/containerd/continuity/ioutils.go
generated
vendored
@@ -37,26 +37,32 @@ func atomicWriteFile(filename string, r io.Reader, dataSize int64, perm os.FileM
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
needClose := true
|
||||
defer func() {
|
||||
if needClose {
|
||||
f.Close()
|
||||
}
|
||||
}()
|
||||
|
||||
err = os.Chmod(f.Name(), perm)
|
||||
if err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
}
|
||||
n, err := io.Copy(f, r)
|
||||
if err == nil && n < dataSize {
|
||||
f.Close()
|
||||
return io.ErrShortWrite
|
||||
}
|
||||
if err != nil {
|
||||
f.Close()
|
||||
return err
|
||||
}
|
||||
if err := f.Sync(); err != nil {
|
||||
f.Close()
|
||||
if err = f.Sync(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
needClose = false
|
||||
if err := f.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return os.Rename(f.Name(), filename)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user