Keep Windows volume identity in memo cache paths - #4476
Open
Darlokt wants to merge 1 commit into
Open
Conversation
Configured cache directories stripped the root from absolute identifiers. On Windows this also stripped the drive letter, so files such as C:\somedir\foo.nd2 and D:\somedir\foo.nd2 mapped to the same memo and could restore state for the wrong dataset. Prefix drive-based cache paths with the normalized drive letter and UNC paths with their server/share hierarchy, while preserving the existing Unix layout. Add platform-independent drive and UNC mapping tests. Fixes ome#3034.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a continuation of #4464.
Fixes #3034.
This prevents configured Memoizer cache paths from colliding when source files
have otherwise identical paths on different Windows drives or UNC shares.
The change:
<cache>/Cand<cache>/D;<cache>/UNC/<server>/<share>;This intentionally changes the configured cache layout for Windows sources.
Existing memos at the old ambiguous paths will be missed and regenerated.
The new layout prevents state for one volume from being loaded for a different dataset on another volume.