btsync ignores changes to device_name in config file


RyanJ

Recommended Posts

Hello all,

Seems I've stumbled across a bug whereby using a config file seems to cause btsync to ignore changes to the device_name in that same config file.

Take this config file for example:


{
"device_name" : "hostname",
"listening_port" : 0,
"storage_path" : "/root/.sync",
"check_for_updates" : false,
"use_upnp" : true,
"download_limit" : 0,
"upload_limit" : 0,
"shared_folders" :
[
{
"secret" : "some_secret",
"dir" : "/some/path",
"use_relay_server" : true,
"use_tracker" : true,
"use_dht" : false,
"search_lan" : true,
"use_sync_trash" : false
}
]
}

If you run the btsync application as a daemon (I have tested this on Linux ARM with version 1.1.48 and 1.1.70 and a friend with Linux x64 version 1.1.48) pointed to that config file, the device name will show up correctly as "hostname" to other clients.

However, if you change the device_name variable (let's say to "namehost"), then restart the application, it ignores the changed device_name and other clients will still see it as "hostname".

Poking around, looking within /root/.sync, inside sync.dat is the old device name - it never gets changed.

The workaround is to delete either the entire .sync folder, or at least just the sync.dat file so that the application regenerates it from the config file.

I realize this is not a common use case, but given that I discovered it when I accidentally forgot to start btsync with the config file the first time, and having the device show up as "My Sync Device" for a while after, I got curious.

Thanks!

RyanJ

Link to comment
Share on other sites

  • 2 months later...

I can also confirm that this problem includes "use_sync_trash" 

 

The symptom was that a folder that was set as "use_sync_trash" : false would not delete the contents of .SyncArchive 

 

The fix was to remove sync.dat and I also removed settings.dat for good measure.

 

After restarting btsync, the *.dat files were regenerated and the .SyncArchive was cleared. 

 

Likely, other config file variables are similarly affected.

 

Thanks

Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.