diff options
author | Josh Gao <jmgao@google.com> | 2015-11-30 10:28:15 -0800 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2015-11-30 11:02:44 -0800 |
commit | 7b284b2f22a3c1076bbb483d6ab49afe191adc3d (patch) | |
tree | 0820709c5fd68bd2ea69a863a17462df05c97432 /adb/file_sync_client.cpp | |
parent | d3266e058e9b4c609491e4115887407446d8ace1 (diff) |
adb: don't pull symlinks when pulling a directory
The previous change to do this (f96dc73b) only skipped individually
named symlinks, not symlinks inside of a directory that was being
pulled.
Bug: http://b/25601283
Change-Id: I25bdcbc546a9d3a0dbd8dacdb065fb134d96022b
Diffstat (limited to 'adb/file_sync_client.cpp')
-rw-r--r-- | adb/file_sync_client.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/adb/file_sync_client.cpp b/adb/file_sync_client.cpp index d284f084ab..bd0e6c41e2 100644 --- a/adb/file_sync_client.cpp +++ b/adb/file_sync_client.cpp @@ -736,9 +736,12 @@ static bool remote_build_list(SyncConnection& sc, if (S_ISDIR(mode)) { dirlist.push_back(ci); } else { - if (S_ISREG(mode) || S_ISLNK(mode)) { + if (S_ISREG(mode)) { ci.time = time; ci.size = size; + } else if (S_ISLNK(mode)) { + sc.Warning("skipping symlink '%s'", name); + ci.skip = true; } else { sc.Warning("skipping special file '%s'", name); ci.skip = true; |