Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for relative paths to stats.db #1097

Open
yocoldle opened this issue Nov 27, 2023 · 2 comments
Open

Add support for relative paths to stats.db #1097

yocoldle opened this issue Nov 27, 2023 · 2 comments
Labels

Comments

@yocoldle
Copy link

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.

@WesleyFister
Copy link

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.

@yocoldle
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants