When a file had a symlink in it's path, the path returned from resolvePath didn't match the path returned from the observer. This change introduces a common method for canonicalizing file paths in
both places.
This is the first time I've done any Mac/Swift/Xi development. As such, I'm not sure my approach is ideal and I have the following questions about my changes:
I have simplified the resolving code. I think this still handles the existing cases correctly but am I missing something?
I wasn't sure whether to limit my changes to the observer code. Canonicalising both the input and observer paths seems fine to me, but perhaps doing this on the inputs could cause issues elsewhere?
Review Checklist
[ ] I have responded to reviews and made changes where appropriate.
[x] I have tested the code
[ ] I have updated comments / documentation related to the changes I made.
[x] I have rebased my PR branch onto xi-mac/master.
Summary
When a file had a symlink in it's path, the path returned from
resolvePath
didn't match the path returned from the observer. This change introduces a common method for canonicalizing file paths in both places.Fixes https://github.com/xi-editor/xi-editor/issues/1143
Questions
This is the first time I've done any Mac/Swift/Xi development. As such, I'm not sure my approach is ideal and I have the following questions about my changes:
Review Checklist