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 authored and GitHub committed 2022-11-25 14:21:21 +01:00
1 parent 991f61cc4d
commit 8c4a0465e9
5 files changed
+19 -13

No files matched your search

+2 -2
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!