diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-09-28 15:52:25 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-28 15:52:26 -0700 |
commit | 1d3527354396d3aa48b494fb409d680cce32dc8b (patch) | |
tree | 6934b6b63276fdf0f30ad0c2cbec7ad08732a890 /libs | |
parent | 925a659d824089d2977b44a6740f793ae65f809a (diff) | |
parent | f41496f1791d983bf8bbbdf95f72528e59284b39 (diff) | |
download | frameworks_base-1d3527354396d3aa48b494fb409d680cce32dc8b.zip frameworks_base-1d3527354396d3aa48b494fb409d680cce32dc8b.tar.gz frameworks_base-1d3527354396d3aa48b494fb409d680cce32dc8b.tar.bz2 |
Merge "Fix issue #7202950: After clearing data, clear data button is still enabled." into jb-mr1-dev
Diffstat (limited to 'libs')
-rw-r--r-- | libs/diskusage/dirsize.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/diskusage/dirsize.c b/libs/diskusage/dirsize.c index 45e7b2a..6703783 100644 --- a/libs/diskusage/dirsize.c +++ b/libs/diskusage/dirsize.c @@ -49,6 +49,9 @@ int64_t calculate_dir_size(int dfd) while ((de = readdir(d))) { const char *name = de->d_name; + if (fstatat(dfd, name, &s, AT_SYMLINK_NOFOLLOW) == 0) { + size += stat_size(&s); + } if (de->d_type == DT_DIR) { int subfd; @@ -64,10 +67,6 @@ int64_t calculate_dir_size(int dfd) if (subfd >= 0) { size += calculate_dir_size(subfd); } - } else { - if (fstatat(dfd, name, &s, AT_SYMLINK_NOFOLLOW) == 0) { - size += stat_size(&s); - } } } closedir(d); |