Skip to content

Commit

Permalink
Add paths to windows metadataFiles
Browse files Browse the repository at this point in the history
When creating a new empty base layer on Windows, hcsshim creates a set
of empty registry hives in C:\Windows\System32\config. These files are
needed in order for the new layer to be considered valid.

Add these locations to the metadataFiles, which excludes them when
comparing the diffs of two layers.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
  • Loading branch information
gabriel-samfira committed Feb 4, 2023
1 parent 5817935 commit a1433d9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions fs/fstest/compare_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ package fstest
// TODO: Any more metadata files generated by Windows layers?
// TODO: Also skip Recycle Bin contents in Windows layers which is used to store deleted files in some cases
var metadataFiles = map[string]bool{
"\\System Volume Information": true,
"\\WcSandboxState": true,
"\\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,
}

0 comments on commit a1433d9

Please sign in to comment.