RFC/WIP: moving hard links along with file #85
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.
Explination
I wanted to open this PR to see if you would be willing to merge one that added support for moving hard links of a file along with a file via an option. If you are interested, I will work this PR into a fully featured one. I heavily use hard links for various file sorting and organization systems I have. As such, without this modification I can't use
mergerfs.balance
as it duplicates the files and breaks the links.Proposed solution:
If you enable the links option, it will use gnu find to locate hard linked files using the
-samefile
argument. You have already enabled rsync hard link handling with the-H
option, so all I had to do was pass the other hard linked files along with the "original" as src files in the rsync command and rsync handles the rest.Questions/Complications:
find_a_file()
to support skippingseen
files.