mtkennerly / ludusavi

Backup tool for PC game saves
MIT License
2.06k stars 48 forks source link

Custom games exclude folders/files #220

Closed TeamLinux01 closed 1 year ago

TeamLinux01 commented 1 year ago

What's your idea?

I would like to be able to tell the tool to include all but one or several files from a directory. It could be broken up to have the include list above the exclude list for a custom game.

I can manually just include all the subfolders and files I want to include and leave the one file out, but it would be easier to be able to list the one file I would like to be excluded.

Thank you very much for your time, effort and dedication.

mtkennerly commented 1 year ago

Thanks for the suggestion :) Could you give me some specific examples of the inclusions you have and the exclusions you'd like to add? I'm wondering if the existing glob support could handle this for you.

TeamLinux01 commented 1 year ago

I would like to exclude the file -/steam/SteamLibrary/steamapps/common/Sonic Adventure DX/mods/SADXModLoader.ini

This file is the configuration file, so it stores the resolution of the game. Since my PC and Steam Deck have different resolutions, this file will change between them, depending on which system does the backup. If I could exclude that file, no other changes would show up between the two systems. I would then create a separate custom game for just the configuration file for each system.

If this is out of scope for what you want Ludisavi to do, I understand.

It has been a big help keeping both my game saves and game installs in sync and I thank you for that.

mtkennerly commented 1 year ago

Gotcha. That's a bit more complicated than what the glob functionality can do. The easiest two options would be either:

Of course, since those settings aren't attached to the custom game directly, they wouldn't be shared between computers in the context of #217 or #95.

If this is out of scope for what you want Ludisavi to do, I understand.

On one hand, I'd prefer to stick to the current "include and uncheck" solution since it's simple, but on the other hand, I'm open to other solutions if it's a common pain point or if it can't handle certain use cases.

It has been a big help keeping both my game saves and game installs in sync and I thank you for that.

I appreciate that :D I'm glad you've found it helpful.

TeamLinux01 commented 1 year ago

If I can easily copy the exclusion file into the config.yaml, that works for me if it is a global exclude.

mtkennerly commented 1 year ago

Sure, you can control it with the backup.filter.ignoredPaths and backup.filter.ignoredRegistry keys. You should see ignoredPaths: [] as the default setting. You can set it like this:

    ignoredPaths:
      - /steam/SteamLibrary/steamapps/common/Sonic Adventure DX/mods/SADXModLoader.ini
mtkennerly commented 1 year ago

By the way, since you're comfortable working with the config file directly, you can also use backup.toggledPaths to prevent backup of specific paths (but still have them show up in the scan results). For example:

backup:
  toggledPaths:
    "Sonic Adventure DX (mod)":
      "/steam/SteamLibrary/steamapps/common/Sonic Adventure DX/mods/SADXModLoader.ini": false