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 <[email protected]>
  • Loading branch information
gabriel-samfira committed Feb 6, 2023
1 parent 5817935 commit 68f7b34
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions fs/fstest/compare_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@

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 68f7b34

Please sign in to comment.