mtkennerly / ludusavi

Backup tool for PC game saves
MIT License
2.76k stars 60 forks source link

`No such file` for file names that include non-native path separators #250

Open games647 opened 1 year ago

games647 commented 1 year ago

Ludusavi version

Other

Operating system

Linux

Installation method

Standalone

Description

I found one game that uses windows path separators in Linux (here: Linux native game). This seems to be very rare and only occurred for one specific feature within that game. However, I found out that ludusavi fails to find the files for backup although it discovers them on scanning. According to the UI, the \ gets translated to a platform native path.

image

Version: 03f000679d505eab45036c8db084f19833b1be66 (Unreleased after: v0.20.0)

Logs

ERROR [ludusavi::path] [SpeedRunners] try 0, unable to copy: /home/HIDDEN/.local/share/SpeedRunners/CEngineStorage/AllPlayers/Ghost/Replay/1_SS Royale.spg -> ./drive-0/home/HIDDEN/.local/share/SpeedRunners/CEngineStorage/AllPlayers/Ghost/Replay/1_SS Royale.spg | No such file or directory (os error 2)
ERROR [ludusavi::path] [SpeedRunners] try 0, unable to copy: /home/HIDDEN/.local/share/SpeedRunners/CEngineStorage/AllPlayers/Ghost/Replay/9_Zoo.spg -> ./drive-0/home/HIDDEN/.local/share/SpeedRunners/CEngineStorage/AllPlayers/Ghost/Replay/9_Zoo.spg | No such file or directory (os error 2)
mtkennerly commented 1 year ago

Yeah, this is a limitation with the current design. This should definitely be addressed, although it will be a bit delicate since this affects several interfaces.

For now, I've updated master with a workaround to simply ignore those paths. Would you mind giving it a try?

games647 commented 1 year ago

Yes, the files are now ignored without any errors.