ServerSync

ServerSync

48.5k Downloads

Possibly Glob issue?

raindropworks opened this issue ยท 5 comments

commented

Serversync Version:

2.6.17

Minecraft Version:

N/A

Issue:

Looking at #57 and #66 and they seem to reference the issue I'm dealing with, but are supposedly fixed.

I have a mod that needs to run serverside but is optional for clients, DebugServerInfo. I use it all the time as the server owner, but since by default it places itself over the minimap, I know most people won't care. So I thought I had the smart idea of having in the mods folder of the server these files:

DebugServerInfo-1.12.2-1.0.5.jar
DebugServerInfo-1.12.2-1.0.5.jar.disabled

Since .disabled is the method both MultiMC and Twitch use for listing disabled mods while allowing them to still be enabled on the client. In both the server side and client side configs I have the following line in the mod blacklist

S:FILE_IGNORE_LIST <
mods/DebugServerInfo*.jar

The idea being any version of DebugServerInfo with a filename ending in .jar would be ignored by ServerSync. It would always make sure a .disabled version was on the client, and while that would leave each client with two copies of the mod (one .jar and one .jar.disabled), the extra 18K of used hard drive space seemed worth the cost compared to making the user manually install the jar if they wanted it.

However, I'm now finding out that it's failing, and is shipping both the .jar and .jar.disabled versions all the time. In Windows I can see that dir Debug*.disabled returns only the .jar.disabled version and dir Debug*.jar returns only the .jar version, so Win10's command prompt does handle the glob correctly

Is it a bug, something I misconfigured, or a Java/Forge limitation that I didn't know about? In the meantime, the only option I have is to fully blacklist the mod and tell clients who want it to manually pull it from Curseforge

commented

Unsure if this is related now, but on the server side I now have mods/DebugServerInfo* on the ignore list and on client side I have mods/DebugServerInfo*.jar on the ignore list, thinking that the server would not look at the .jar or .disabled version on the client, but now any time I have the .disabled version on the client it gets deleted. It won't touch a .jar version, so it's a stable workaround, but not sure what's causing the deletion

commented

Using SeverSync-2.6.21 https://github.com/superzanti/ServerSync/releases/tag/2.6.21

Test case:

Server files

foobar-1.2.jar
foobar-1.2.jar.disabled

File ignore patterns: mods/foobar*.jar

Client

(Unconfigured defaults)

Result:
foobar-1.2.jar - Not transferred to client
foobar-1.2.jar.disabled - Transferred to client


I don't seem to be able to reproduce this on some of the newer serversync interations, though I am not sure I understand the use case.

Is this mod a [server required | client optional] deal?

If so then you might be looking for the 'clientmods' feature https://github.com/superzanti/ServerSync/wiki/Client-Mods. This would allow you to have the mod present on the server while pushing a '.disabled' version to clients that do not explicitly refuse it.

commented

Re-tested using 2.6.17. Same result.

commented

Odd ... I will admit I missed the clientmods option and that explains what that config flag meant. I'll have to do more digging into it, but I'm not able to right now

commented

closing this for now, if the issue is still relevant feel free to reopen.