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
diff --git a/adb/file_sync_client.cpp b/adb/file_sync_client.cpp
index d284f08..bd0e6c4 100644
--- a/adb/file_sync_client.cpp
+++ b/adb/file_sync_client.cpp
@@ -736,9 +736,12 @@
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;