aboutsummaryrefslogtreecommitdiff
path: root/src/apps/projsync.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/apps/projsync.cpp')
-rw-r--r--src/apps/projsync.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/apps/projsync.cpp b/src/apps/projsync.cpp
index 8e6ac96b..7f3d5e56 100644
--- a/src/apps/projsync.cpp
+++ b/src/apps/projsync.cpp
@@ -238,7 +238,7 @@ int main(int argc, char *argv[]) {
endpoint.resize(endpoint.size() - 1);
}
- if (!quiet) {
+ if (!quiet && !listFiles) {
std::cout << "Downloading from " << endpoint << " into " << targetDir
<< std::endl;
}
@@ -344,12 +344,6 @@ int main(int argc, char *argv[]) {
}
}
- if (listFiles) {
- std::cout << name << "," << area_of_use << "," << source_id
- << "," << file_size << std::endl;
- continue;
- }
-
const bool matchSourceId =
queryAll || queriedSourceId.empty() ||
source_id.find(queriedSourceId) != std::string::npos;
@@ -479,7 +473,14 @@ int main(int argc, char *argv[]) {
} while (false);
}
- if (matchFile & matchSourceId && matchAreaOfUse && matchBbox) {
+ if (matchFile && matchSourceId && matchAreaOfUse && matchBbox) {
+
+ if (listFiles) {
+ std::cout << name << "," << area_of_use << "," << source_id
+ << "," << file_size << std::endl;
+ continue;
+ }
+
const std::string resource_url(endpoint + '/' + name);
if (proj_is_download_needed(ctx, resource_url.c_str(), false)) {
total_size_to_download += file_size;
@@ -493,7 +494,7 @@ int main(int argc, char *argv[]) {
}
}
- if (!quiet && total_size_to_download > 0) {
+ if (!quiet && !listFiles && total_size_to_download > 0) {
if (total_size_to_download > 1024 * 1024)
std::cout << "Total size to download: "
<< total_size_to_download / (1024 * 1024) << " MB"