Closed tomhundt closed 1 year ago
Unfortunately, as a favorite could be found anywhere on a system, there is no easy way to be OS agnostic. While in your specific use case, your files follow a similar path, I'd argue that you're in a minority. Any solution I could provide would not be very portable for most. I would not normally suggest syncing the favorite settings across platforms, or even systems, as available files and folder paths are not guaranteed to be the same.
I work cross-platform Mac/Windows these days, and have my Sublime User dir synced via Dropbox. This means that when I create a new Favorite, it shows up on all my computers -- great!
But: if a favorite was created on a Mac, its path gets saved with forward slashes (/Users/thundt/Downloads/foo.txt) and if saved on Windows, it's saved with backslashes (C:\Users\thundt\Downloads\foo.txt).
When I go to open these, there is no error, but rather (if opening a Mac favorite on Windows) presents me with an empty file, marked as modified, or (if opening a Win file on Mac) silently fails (no console output).
Any ideas? Looking at the code, it appears you're just doing this, and letting Sublime worry about any conversion:
One issue is probably the drive letter... silly Windows. It doesn't look like there's a hook I could easily patch into to add a little conversion routine, which is probably what I'd need.
Thanks