Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synced folder error #17

Open
stfj123 opened this issue Dec 22, 2021 · 3 comments
Open

Synced folder error #17

stfj123 opened this issue Dec 22, 2021 · 3 comments
Labels

Comments

@stfj123
Copy link

stfj123 commented Dec 22, 2021

Serversync Version: serversync-4.2.0

Minecraft Version: 1.12.2

Issue: The following content is from Google Translate, I hope it can clearly express my question.

There are two folders on the server, mods and clientmods. Clientmods contains files that need to be synchronized. Suppose there is an A. But after the client is synchronized, A is not in the client's mods. Instead, the client creates a new clientmods folder and synchronizes A to here. Is this just a mistake in my settings?

Logs (serverysync & minecraft)

@rheimus
Copy link
Owner

rheimus commented Dec 23, 2021

Can you post your files configuration, clientmods is a special folder that serversync should try to transfer to the clients mods folder.

@stfj123
Copy link
Author

stfj123 commented Dec 23, 2021

The configuration of the server is as follows, and the name of the folder that needs to be synchronized is modified.
The client does not modify the configuration, it is the default configuration. I currently use the .exe file to test on my computer.
I use sponge.

{
"general": {
"push_client_mods": false,
"sync_mode": 2
},
"connection": {
"port": 38067,
"buffer": 65536
},
"rules": {
"directories": [
{
"path": "mods",
"mode": "mirror"
}
],
"files": {
"include": [
"clientmods/"
],
"ignore": [
"
/serversync-.jar",
"**/serversync-
.cfg"
],
"redirect": [ ]
}
},
"misc": {
"locale": "zh_CN"
}
}

@rheimus rheimus closed this as completed Dec 27, 2021
@rheimus
Copy link
Owner

rheimus commented Dec 27, 2021

https://github.com/superzanti/ServerSync/wiki/Client-Mods

You have two options.

  1. Set push_client_mods to true and remove clientmods from the include list.

There is a built in system for handling the special folder called clientmods.

  1. Add a redirect for clientmods

https://github.com/superzanti/ServerSync/wiki/Redirecting-files
Redirects allow you to take files that match a pattern and move them somewhere else on the client.

For example, this redirect pattern would be the same as the built in clientmods feature.

redirect: [
  { pattern: 'clientmods/**', redirectTo: 'mods' }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants