Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cloning instances with shared stock files on Windows #4297

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HebaruSan
Copy link
Member

Problem

If you clone an instance and use the shared stock files option from #4129, and then clone the clone again, the resulting final instance's junction symlink entries are invalid.

Cause

The target path can end up with a prefix of \??\\??\, which is one \??\ too many.

(Do not ask me wtf that sequence means. I have now read about five explanations of it and still have not the slightest clue. It's just Windows being Windows.)

Changes

Now when DirectoryLink.TryGetTarget retrieves the target of a junction on Windows, it strips \??\ prefixes from it. This way when ReparseDataBuffer.FromPath adds it again, there'll be only one.

Fixes #4296.

@HebaruSan HebaruSan added Bug Something is not working as intended Easy This is easy to fix Core (ckan.dll) Issues affecting the core part of CKAN Windows Issues specific for Windows labels Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended Core (ckan.dll) Issues affecting the core part of CKAN Easy This is easy to fix Windows Issues specific for Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Copying an install which had the stock files shared results in error when trying to run
1 participant