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:
Lutz Justen
2022-11-25 14:21:21 +01:00
committed by GitHub
parent 991f61cc4d
commit 8c4a0465e9
5 changed files with 19 additions and 13 deletions

View File

@@ -100,14 +100,14 @@ FileFinderAndSender::FileFinderAndSender(PathFilter* path_filter,
recursive_(recursive),
relative_(relative),
request_size_threshold_(request_byte_threshold) {
// (internal): Support / instead of \ in the source folder.
// Support / instead of \ in the source folder.
path::FixPathSeparators(&sources_dir_);
}
FileFinderAndSender::~FileFinderAndSender() = default;
absl::Status FileFinderAndSender::FindAndSendFiles(std::string source) {
// (internal): Support / instead of \ in sources.
// Support / instead of \ in sources.
path::FixPathSeparators(&source);
// Special case, "." and ".." should not specify the directory, but the files
// inside this directory!