Mephi00 / v-rising-wine-docker-image

MIT License
53 stars 31 forks source link

Persistent Data Path config and config file placements are mismatched, resulting in config file not being used. #3

Closed Frostea closed 2 years ago

Frostea commented 2 years ago

In entrypoint.sh, -persistentDataPath Z:\\saves is specified. This means that the server will take Z:\saves as the config/save folder. This folder will have a structure like this:

Z:\saves Z:\saves\Saves\v1\ Z:\saves\Settings\ServerGameSettings.json Z:\saves\Settings\ServerHostSettings.json

Currently in entrypoint.sh, the config files ServerGameSettings.json and ServerHostSettings.json are copied into the default config location. However, by specifying -persistentDataPath, the default config location will not be used.

zhixXiang commented 2 years ago

You are right, put the Settings in the /saves file will work.

Mephi00 commented 2 years ago

The default location is still used if there are no setting files in the specified persistenceDataPath.

I will however adjust the documentation and entrypoint script accordingly once I have the option to do so. Thank you for mentioning this.

Mephi00 commented 2 years ago

I have added the functionality and documentation, but refrained from writing the settings into /saves/Settings. I wanted to update the settings, when the environment variables change. This action would, however, overwrite the already present files in /saves/Settings. To avoid overwriting custom configurations in /saves/Settings, I opted to not use the folder unless it is already present, in which case a change of env vars does not cause a change in configuration. This behavior has been documented accordingly.

I hope this provides closure and a good explanation on why I chose not to use /saves/Settings as the default settings folder. As stated above, the default settings path is used, when the folder /saves/Settings is not present.