mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-01-30 10:35:37 +02:00
[cdc_rsync] Enable local syncing (#75)
Adds support for local syncs of files and folders on the same Windows machine, e.g. cdc_rsync C:\source C:\dest. The two main changes are - Skip the check whether the port is available remotely with PortManager. - Do not deploy cdc_rsync_server. - Run cdc_rsync_server directly, not through an SSH tunnel. The current implementation is not optimal as it starts cdc_rsync_server as a separate process and communicates to it via a TCP port.
This commit is contained in:
@@ -240,7 +240,7 @@ class ChunkerTmpl {
|
||||
}
|
||||
|
||||
// Init hash to all 1's to avoid zero-length chunks with min_size=0.
|
||||
uint64_t hash = (uint64_t)-1;
|
||||
uint64_t hash = UINT64_MAX;
|
||||
// Skip the first min_size bytes, but "warm up" the rolling hash for 64
|
||||
// rounds to make sure the 64-bit hash has gathered full "content history".
|
||||
size_t i = cfg_.min_size > 64 ? cfg_.min_size - 64 : 0;
|
||||
|
||||
Reference in New Issue
Block a user