![ServerSync](https://media.forgecdn.net/avatars/thumbnails/254/696/256/256/637199290945083080.png)
Need a way to pass config folder and subfolders in root folder for mods like pokecube which contain multiple sub folders.
P3rf3ctXZer0 opened this issue ยท 9 comments
The serversync application is not actually scanning any configuration files however it is scanning any and all other folders and directories; thank you for this!
Probably broke the config scanning when removing the forge dependency, had to shuffle around things with SyncFiles.
Did some tests, seems like configs are syncing alright.
By default ServerSync will not sync config files unless they are added to the servers include list, I did this as on the whole configs for mods seem to be designed in a non sync friendly way (back when it was just a blacklist of items to not sync you would have to add half your config files in there so that you didn't lose a bunch of user configured items)
Although this does bring up an interesting enhancement, should probably have a file include list that lets you sync from the root directory (it is conceivable that there could be a file users wish to sync that sits in root)
The config sync is a bit janky though as it is just looking for file names, so currently if you specify to sync "myawsomeconfig.cfg" and the config directory is like so:
config
modA
myawsomeconfig.cfg
modB
myawsomeconfig.cfg
It will sync both of these files. As raised in #43 I will probably implement some sort of globbing / wildcard support for this.
So it doesn't actually sync the root of folder configs folder? Yeah that would explain it. Well thank you for explaining that to me.
As for the issue title, should be able to add pokecube's folder to the syncable directories list, its just the config folder that has special handling.
To clarify:
Currently serversync has no way to sync a specific file from the root directory, say: MyAwsomeLauncher.exe
ServerSync can however sync any directory you wish by adding it to the syncable_directories list.
S:DIRECTORY_INCLUDE_LIST <
mods
pokecube
>
would sync all files in both Minecraft/mods & Minecraft/pokecube.
I may add support for pokecube native, currently flan's mod has native support for its content packs that get put in the root dir, although this is adding potential points of failure and can be done anyway with the dir list so I also may not ๐
Examples are always better so heres one for not syncing all configs by default:
- MyMinimap mod creates a user based config for waypoints, ServerSync synchronizes this confg and wipes out the users waypoints
- Optifine, user based settings for graphics, again wiped by ServerSync
- MyCoolHotkeys, user hotkeys wiped by sync
etc and so on, makes much more of a job for the server admin to keep adding a bunch of config files to the blacklist.
Generally the only time I have needed to sync a config file is for potion ID conflicts or Minetweaker/HQM, which can be pretty easily added to the config_include_list
Not really sure why mass config sync is needed but hey.
2.6.7 fixes a bug where 0 length files would lock the server and it also removes the enforced config handling.
You can now add config to the directory include list to sync all of them.
Is there a way to just scan config files? Its just better to keep it scanned and have a blacklist instead, makes less work for server owners ... :( especially ones like me who have 2 kids and a Wife.
@rheimus thank you very much!