Open Kyuuhachi opened 7 years ago
hmm, i'm not really sure whether it should really behave like what you expect...
that's just how symlimks work:
radek@pupik /tmp> echo 'a' >a
radek@pupik /tmp> ln -s a b
radek@pupik /tmp> echo 'b' >b
radek@pupik /tmp> cat a
b
Yeah, I know that. I just feel it's kinda unintuitive that writing to a RO-file and a RO-symlink behaves differently. Since I usually use unionfs to make sure my game installations aren't dirtied by savefiles or mods, it's also kinda destructive.
My current use-case is a little more complex (as it actually involves the aforementioned symlinks), but it's mostly irrelevant.
well, the problem here is, partially, that your symlink is pointing "outside" of the union.
anyway, if you're able to describe your use case, maybe we may come up with a solution...
Yeah, I know.
Basically, I'm trying to union a lot of folders together (in order to keep game, mods, and save files separate), except the folders aren't rooted at the same place. I do this by creating a tree with a lot of symlinks (which as the additional advantages of making them all lowercase, which I think improves Wine performance, as well as allowing me to put links to files as well), and then unioning that tree to keep writes separate. Sometimes, the game writes to an existing file, such as a config file. I'd like that write to go where I tell it to.
Maybe I should look for/create some kind of resolve-symlink-fs and put that between the symlink tree and the union?
When writing to a symlink in a RO branch, the data is written to the symlink's target instead of writing to a RW branch.
Setup:
Expected behavior:
Actual behavior: