ludusavi icon indicating copy to clipboard operation
ludusavi copied to clipboard

Redirects path are wrongly parsed when synced across OS

Open WangEdward opened this issue 1 year ago • 1 comments

Problem

I was trying to sync some game progress between a Mac and a Windows PC, and the path for the game saves as follows: Mac: /Users/edward/.config/Ryujinx/... Windows: C:\Users\admin\AppData\Roaming\Ryujinx\...

I first tried to use Bidirectional on the Windows PC, configured as follows: Screenshot 2023-03-01 at 22 07 48 And this is what I got (on Mac): Screenshot 2023-03-01 at 22 28 44 What seems to have happened is that on Windows, /Users/edward/.config/Ryujinx/... is recognised as a relative path and it auto-completes it to a windows 'absolute path' C:/Users/edward/.config/Ryujinx/... 😥

Temperally workaround

A rough way of making the program functional is config the two devices as follows: Screenshot 2023-03-01 at 22 08 24 Screenshot 2023-03-01 at 22 34 51 When just redirecting the restore path, the backup path saved in the mapping.yaml will be correct.

It can let the game save work. However, the root cause is not solved therefore there's still a small problem: On mac upon restoration, C:/Users/admin/AppData/... is recognised by mac as a relative path and it converted it to a mac 'absolute path' /Users/edward/C_/Users/admin/AppData/...😂 Screenshot 2023-03-01 at 22 53 53 This setting does work because the redirect path on mac is being parsed the same way, it's now just a minor 'display error'.

Possible Solution

  • The is_absolute method might need a small fix.
  • Adding a checkbox to let the user set if the path is absolute can be a very user-friendly solution.
  • Or it might be possible to use a certain format for the path input to indicate if the path is an absolute/relative directory. e.g. add $ before the relative paths
  • Allowing users to use curtain environment variables in the path (as mentioned in https://github.com/mtkennerly/ludusavi/issues/16#issuecomment-656701853) can also solve the problem.

Anyway, thanks very much for your effort on this project, it's very helpful.❤️ (I was trying to make this issue short, but my English level does stop me from that, my apologies)

WangEdward avatar Mar 01 '23 15:03 WangEdward