Only full-data back up regular files + directories am: da2018efeb

am: 0d816b8f69

Change-Id: I3b28c373c58ebebf27b1297e770d2023767e6396
This commit is contained in:
Christopher Tate
2016-10-13 21:17:09 +00:00
committed by android-build-merger

View File

@@ -649,10 +649,11 @@ public abstract class BackupAgent extends ContextWrapper {
File file = scanQueue.remove(0);
String filePath;
try {
// Ignore symlinks outright
// Ignore things that aren't "real" files or dirs
StructStat stat = Os.lstat(file.getPath());
if (OsConstants.S_ISLNK(stat.st_mode)) {
if (DEBUG) Log.i(TAG, "Symlink (skipping)!: " + file);
if (!OsConstants.S_ISREG(stat.st_mode)
&& !OsConstants.S_ISDIR(stat.st_mode)) {
if (DEBUG) Log.i(TAG, "Not a file/dir (skipping)!: " + file);
continue;
}