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

Hardlink support #334

Open
musjj opened this issue Mar 4, 2023 · 4 comments
Open

Hardlink support #334

musjj opened this issue Mar 4, 2023 · 4 comments

Comments

@musjj
Copy link

musjj commented Mar 4, 2023

There are some oddballs out there like Windows Terminal, which refuses to detect changes in the config file if it's a symlink (microsoft/terminal#1812 (comment)).

Recreating the symlink doesn't seem to do it either. The only currently viable solution is to use hardlinks, so it would be nice if dotbot can support it.

@kurtmckee
Copy link
Contributor

To confirm, you're specifically asking for Windows NTFS hardlink support?

@musjj
Copy link
Author

musjj commented Jul 16, 2023

Yes, I wanted an NTFS hardlink (the one created with mklink /H). I no longer use Windows so I don't need this anymore, but I'll keep this issue open since there are other people who still need it judging from the thumbs ups.

@kurtmckee
Copy link
Contributor

@anishathalye I'm assuming that this can be accomplished in the preferences, like

- link:
    ~/.config/terminator:
      path: config/terminator
      type: hardlink  # default is "symlink"

I considered but rejected designing this as a hardlink: true flag, because NTFS also supports directory junctions and it may be desirable to expand this in the future. Therefore a flag option would be less extensible.

If this looks acceptable, I'll cook up a patch to add this support and document it.

@jaysonwcs
Copy link

jaysonwcs commented Jul 29, 2024

This would be interesting when using together with Apparmor, because Apparmor checks authorizations only against the original file, skipping the soft link. So when it needs to check authorization for fstab, for example, it denies the access because the fstab file is on my dotfiles folder, and not on etc folder, where it is expected.
I'm really interested in this feature!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants