mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-05-01 16:43:08 +03:00
Expand path variables for sync destination (#18)
Expand path variables for sync destination Running commands like cdc_rsync C:\assets\* host:~/assets -vr would create a directory called ~assets. This CL expands path variables properly.
This commit is contained in:
@@ -80,9 +80,9 @@ class AsyncFileWatcher {
|
||||
files_changed_cb_(std::move(files_changed_cb)),
|
||||
dir_recreated_cb_(std::move(dir_recreated_cb)),
|
||||
timeout_ms_(timeout_ms) {
|
||||
// (internal): Check whether ReadDirectoryChangesExW is available.
|
||||
// It requires Windows 10, version 1709, released October 17, 2017, or
|
||||
// corresponding Windows Server versions.
|
||||
// Check whether ReadDirectoryChangesExW is available. It requires Windows
|
||||
// 10, version 1709, released October 17, 2017, or Corresponding Windows
|
||||
// Server versions.
|
||||
if (!enforceLegacyReadDirectoryChangesForTesting) {
|
||||
read_directory_changes_ex_ =
|
||||
reinterpret_cast<decltype(ReadDirectoryChangesExW)*>(::GetProcAddress(
|
||||
|
||||
@@ -119,9 +119,9 @@ ProcessStartInfo RemoteUtil::BuildProcessStartInfoForSsh(
|
||||
|
||||
ProcessStartInfo RemoteUtil::BuildProcessStartInfoForSshPortForward(
|
||||
int local_port, int remote_port, bool reverse) {
|
||||
// (internal): Usually, one would pass in -N here, but this makes the
|
||||
// connection terribly slow! As a workaround, don't use -N (will open a
|
||||
// shell), but simply eat the output.
|
||||
// Usually, one would pass in -N here, but this makes the connection terribly
|
||||
// slow! As a workaround, don't use -N (will open a shell), but simply eat the
|
||||
// output.
|
||||
ProcessStartInfo si = BuildProcessStartInfoForSshInternal(
|
||||
GetPortForwardingArg(local_port, remote_port, reverse) + "-n ", "");
|
||||
si.stdout_handler = [](const void*, size_t) { return absl::OkStatus(); };
|
||||
|
||||
Reference in New Issue
Block a user