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

Added symlink support on removeCommonPath #430

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Devenor
Copy link

@Devenor Devenor commented Mar 25, 2015

Hi,

I like to have my ROMs in one separate path and use symlinks in the roms folders so I can use the same ROMs in multiple emulators without having to copy them. The problem is that removeCommonPath doesn't work with symlinks 'cause fs::canonical returns the path of the original file instead of the symlink's, and relativeTo doesn't necessarily have to match the former, it's ment to match the latter. This causes that the scraped metadata doesn't work.

We can avoid this by applying fs::canonical just to the parent path and then append the filename when the file is a symlink. I've tested it on a Raspberry PI running RetroPie but it's all done with boost so it should work on Windows too.

mmatyas added a commit to mmatyas/EmulationStation that referenced this pull request Aug 2, 2016
The problem is that removeCommonPath doesn't work with symlinks 'cause
fs::canonical returns the path of the original file instead of the symlink's,
and relativeTo doesn't necessarily have to match the former, it's ment to
match the latter. This causes that the scraped metadata doesn't work. We can
avoid this by applying fs::canonical just to the parent path and then append
the filename when the file is a symlink.

Source: Aloshi#430
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

Successfully merging this pull request may close these issues.

None yet

1 participant