mirror of
https://github.com/flatpak/flatpak.git
synced 2026-03-14 13:15:35 -04:00
If we're specifying --filesystem=/some/path, where the final element in the path is a symlink we need to special case this. We used to rely on bubblewrap resolving the symlink for the source and creating a bind mount directly to that, but this does not work if the parent directory is already visible in the sandbox, because we can't bind-mount on top of the pre-existing symlink. Instead we detect this the symlink early, resolve the target and bind mount in that, then we create a real symlink in its place. However, that doesn't work if the paren't *doesn't* exist, so we have to check for this and not create the symlink if it is already going to be visible in the sandbox.