mtkennerly / ludusavi

Backup tool for PC game saves
MIT License
2.68k stars 58 forks source link

Problem with UNC savegame directories #385

Closed annomatik closed 1 month ago

annomatik commented 2 months ago

Ludusavi version

v0.25.0

Operating system

Windows

Installation method

Standalone

Description

I have my Windows games on a network drive, which works well. I have mapped that network drive to a drive letter (e.g. \server\games is G:). I am also backing up to a (different) network drive, that doesn't have a drive letter (e.g. \server\backup\ludisavi).

Now, when I make a backup of a save dir, that's on G:, ludisave converts that path. For example, Age of Empires. Instead of games\strategy\Age of Empires, it converts the filenames to drive-____UNC_SERVER_GAMES_strategy_Age of Empires_savegame ... and so on -- it's just one big filename. And of course, it cannot restore that :-)

Would it make sense to instead of resolving the UNC name to simply use the drive letter in that case?

Logs

No response

mtkennerly commented 2 months ago

Hi! Thanks for reporting this. I'll look into a fix.

Would you mind sharing the mapping.yaml file from your Age of Empires backup? I'm curious how the paths are formatted in there.

mtkennerly commented 2 months ago

Can confirm I was able to reproduce this locally. I added a custom game with a path of \\localhost\share-network (mapped to C:\share-network).

drives:
  drive-____UNC_localhost_share-network_test.txt: "\\\\?\\UNC\\localhost\\share-network/test.txt"

backups:
  - files:
      "\\\\?\\UNC\\localhost\\share-network/test.txt/":
        hash: fde773a18bb29f5ed65e6f0a7aa717fd1fa485d4
        size: 6
annomatik commented 2 months ago

Thanks! Do you still need my mapping.yaml? It's quite big I have a lot of savegames for Age of Empires :-)

mtkennerly commented 2 months ago

Nah, that's okay since I can reproduce it.

mtkennerly commented 2 months ago

Here's a build you can use for now with a fix for the backups: ludusavi-v0.25.0-post.3+da992d4-win64.zip

In the save list, there are buttons to open the folders in Windows Explorer, which still don't work for \\?\UNC\server\share paths. I'll see if I can fix that separately.

annomatik commented 1 month ago

Looks great, thank you!