steam-deck-utilities
steam-deck-utilities copied to clipboard
Make swap path and home directory completely dynamic
This pull request makes the swap path and home directory completely dynamic.
A couple suggestions:
- When joining file paths it's almost always better to use
filepath.Join
as it'll make sure the path is valid joined correctly. - If DefaultSwapFileLocation is just calling
getSwapFileLocation()
it should be removed entirely and replaced with the function. This is especially true asgetSwapFileLocation
returns an error that's currently completely ignored.
When joining file paths it's almost always better to use filepath.Join as it'll make sure the path is valid joined correctly.
I agree here, since #31 standardized all of the joins.
If DefaultSwapFileLocation is just calling getSwapFileLocation() it should be removed entirely and replaced with the function. This is especially true as getSwapFileLocation returns an error that's currently completely ignored.
Also agreed. This will let us surface the error closer to the user if necessary. We'll also no longer need BTRFSSwapFileLocation
, as that was only there to compensate for the hard-coded path.
I made the suggested changes, thanks for teaching me. I recently started learning go.
I just tested this and it looks great. I'm waiting for the merge of #52 to accept this. Would you mind incrementing the version number to 2.0.3?