ServerSync

ServerSync

48.5k Downloads

Issues ignoring a symlink to a included folder

vico93 opened this issue ยท 2 comments

commented

Serversync Version: 4.2.0

Minecraft Version: 1.12.2 (Forge 14.23.5.2855)

Issue:

Hello! I'm trying to sync my profile (modpack) through ServerSync. To prevent client-only mods to be mixed with "dual-side" mods i put the client mods in a folder called mods_client and symlink the folder with mods\1.12.2 to be loaded with Forge.
The question is, while i want to send the mods_client content to the client, i don't want to send the symlinked folder (mods\1.12.2 - the user will make the symlink himself after the sync ).
So i configured my server and tested the sync, and although i was able to not allow the symlink to be replicated to it only creates an empty mods_client folder. For me seems like serversync is actually resolving the symlink and applying the files ignore directive to the original folder.

Below in the gist is the server config and the client log to try to elucidate the problem.
https://gist.github.com/vico93/034504a7cd9d41c67a889d17bd5eeff2

commented

Documentation is a bit out of date but have you tried the clientmods feature of serversync?
https://github.com/superzanti/ServerSync/wiki/Client-Mods

The concept behind the client mods feature is served mods that do not get loaded by the server.

An alternative if you want full control is to use file redirects to sync the files from your mods_client folder to a different place on the client.
e.g.

redirect: [
  { pattern: "mods_client/**", redirectTo: "mods/1.12.2" }
]

The downside is that clients don't get the option to refuse the mods if they want to do their own thing instead.

I have not really put any systems in place around supporting symlinks so I assume it is just using Java defaults for symlink resolving (if memory serves default is follow-links).

commented

I will take that on mind. Thanks a lot!