mmatyas / pegasus-frontend

A cross platform, customizable graphical frontend for launching emulators and managing your game collection.

Home Page:http://pegasus-frontend.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for relative paths to stats.db

yocoldle opened this issue · comments

Current behavior:
Currently, stats.db is being written using absolute paths. If the drive changes, the game records in the plays table become invalid. Additionally, due to the change in absolute paths, multiple records of the same game will be written in the paths table.

Expected behavior:
When running Pegasus in portable mode, the config folder containing stats.db has a fixed path relative to pegasus.exe. It is possible to use relative paths to record game paths in the paths table. This way, even if the drive changes, the records in stats.db will remain valid.

For scenarios where Pegasus is not running in portable mode, it is uncertain whether supporting relative paths would be meaningful. This aspect is open for discussion and further consideration.

Reason for expectation:
settings.txt and game_dirs.txt are already support relative paths, adding support for relative paths to stats.db would significantly enhance portability and allow portable mode Pegasus to rely entirely on relative paths for configuration.

This would be something very nice to have. Every so often I will move my Pegasus install to a different computer and have to manually edit the paths in stats.db to get it working. Also, Soon I'm going to have Pegasus on my desktop and Steam Deck, planning to use Syncthing to sync stats.db but this wouldn't work with absolute paths.

This would be something very nice to have. Every so often I will move my Pegasus install to a different computer and have to manually edit the paths in stats.db to get it working. Also, Soon I'm going to have Pegasus on my desktop and Steam Deck, planning to use Syncthing to sync stats.db but this wouldn't work with absolute paths.

Yes, relative path can also make Peagasus fully adapt to multi-device synchronization, it'll be nice since we already have multiple platform clients.