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

dev link creation fails for network locations #494

Closed
jonpas opened this issue Apr 21, 2023 · 5 comments · Fixed by #599
Closed

dev link creation fails for network locations #494

jonpas opened this issue Apr 21, 2023 · 5 comments · Fixed by #599
Labels
bug Something isn't working

Comments

@jonpas
Copy link
Collaborator

jonpas commented Apr 21, 2023

As expected, if you try to $ hemtt dev a mod on a network drive (UNC path), the link creation will fail, as creating symbolic links of any kind with source and target both being on a network drive, is not supported: The file or directory is not a reparse point.

Not sure how to solve or work-around this yet. One alternative which I have used so far for linking on network drives, is to just link on my host Linux system (where the drive is mapped from). This is obviously not ideal for switching branches, rebuilding etc.

If I run $ hemtt dev on Linux, it will create links and build successfully. If I then run the same command on Windows on that same network drive, it will just wipe the addons/ folder as it's a different type of a link and will delete the link source as well.

This might be very specific to me, but doing things on a network drive, eg. on your laptop with a shared network drive from your PC, is probably not that big of a use-case stretch.

This obviously wasn't the problem before with file-patching builds residing directly in root addons/ folder.

@jonpas jonpas added the bug Something isn't working label Apr 21, 2023
@BrettMayson
Copy link
Owner

BrettMayson commented Nov 2, 2023

I think this is a bit too niche, I think one solution would be allowing the specification of a custom directory for the temporary operations, rather than the system temp folder?

@BrettMayson BrettMayson closed this as not planned Won't fix, can't repro, duplicate, stale Nov 2, 2023
@jonpas
Copy link
Collaborator Author

jonpas commented Nov 2, 2023

No, symlinks to system temp folder work fine, as those go network drive => local drive.

TRACE junction link "%tmp%\\hemtt\\Arma 3_Mods_CBA_A3\\source\\x\\cba\\addons\\accessory" => "E:\\Arma 3\\Mods\\CBA_A3\\addons\\accessory"
TRACE directory symbolic link "%tmp%\\hemtt\\Arma 3_Mods_CBA_A3\\source\\x\\cba\\addons\\accessory" => "E:\\Arma 3\\Mods\\CBA_A3\\addons\\accessory"

E: is network-mounted, C: is local.

Only the final symlinking to .hemttout/dev is problematic.

TRACE junction link "E:\\Arma 3\\Mods\\CBA_A3\\.hemttout\\dev\\addons\\accessory" => "E:\\Arma 3\\Mods\\CBA_A3\\addons\\accessory"
TRACE junction link "E:\\Arma 3\\Mods\\CBA_A3\\.hemttout\\dev\\addons\\disposable" => "E:\\Arma 3\\Mods\\CBA_A3\\addons\\disposable"
...
TRACE directory symbolic link "E:\\Arma 3\\Mods\\CBA_A3\\.hemttout\\dev\\addons\\accessory" => "E:\\Arma 3\\Mods\\CBA_A3\\addons\\accessory"
TRACE directory symbolic link "E:\\Arma 3\\Mods\\CBA_A3\\.hemttout\\dev\\addons\\disposable" => "E:\\Arma 3\\Mods\\CBA_A3\\addons\\disposable"
...
ERROR Unable to create link: The file or directory is not a reparse point.

It correctly tries junction first, then symbolic, but it still won't work as those go network drive => network drive, which is just straight up unsupported.

Maybe ability to specify a different .hemttout/dev folder?

@BrettMayson
Copy link
Owner

Ah I see, that should be fairly straightforward to add, probably

@jonpas
Copy link
Collaborator Author

jonpas commented Nov 2, 2023

Relevant to this, issue with hemtt dev on Linux, it creates a link to a path with \ instead of /, so symlink is invalid.

# Invalid
❱ ln -s "<CBA_A3>/addons\network" .hemttout/dev/addons/network
❱ ll .hemttout/dev/addons/network
lrwxrwxrwx 1 jonpas jonpas 51 Nov  2 15:36 .hemttout/dev/addons/network -> '<CBA_A3>/addons\network'

# Valid
❱ ln -s "<CBA_A3>/addons/network" .hemttout/dev/addons/network
❱ ll .hemttout/dev/addons/network
lrwxrwxrwx 1 jonpas jonpas 51 Nov  2 15:36 .hemttout/dev/addons/network -> '<CBA_A3>/addons/network'/

@jonpas
Copy link
Collaborator Author

jonpas commented Nov 3, 2023

#599 fixes above comment and also makes this issue irrelevant (for me) as I can now just hemtt dev on Linux (where those network drives are "physical") and get correct links (drive shared via SMB with wide links enabled).

However this is potentially still a problem for working off of actual network drives such as NAS shares or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants