summaryrefslogtreecommitdiffstats
path: root/libtar
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-08-27 03:36:23 +0200
committerDees_Troy <dees_troy@teamw.in>2013-08-28 18:10:36 +0200
commit86e77bcbb2d0d819024bace7e3a9f3594d03516f (patch)
tree5f112953ecba004a66be604e960bd97f46a73308 /libtar
parentMerge "update exfat to latest commits for io issues" into twrp2.5 (diff)
downloadandroid_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.tar
android_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.tar.gz
android_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.tar.bz2
android_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.tar.lz
android_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.tar.xz
android_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.tar.zst
android_bootable_recovery-86e77bcbb2d0d819024bace7e3a9f3594d03516f.zip
Diffstat (limited to 'libtar')
-rw-r--r--libtar/wrapper.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libtar/wrapper.c b/libtar/wrapper.c
index 0673244f5..dab7e0076 100644
--- a/libtar/wrapper.c
+++ b/libtar/wrapper.c
@@ -153,10 +153,12 @@ tar_append_tree(TAR *t, char *realdir, char *savedir, char *exclude)
if (exclude) {
int omit = 0;
for (i = 0; i < (n_spaces+1); i++) {
- if (dent->d_name == excluded[i]) {
- printf(" excluding '%s'\n", excluded[i]);
- omit = 1;
- break;
+ if (excluded[i] != NULL) {
+ if (strcmp(dent->d_name, excluded[i]) == 0 || strcmp(excluded[i], realdir) == 0) {
+ printf(" excluding '%s'\n", excluded[i]);
+ omit = 1;
+ break;
+ }
}
}
if (omit)
@@ -179,7 +181,7 @@ tar_append_tree(TAR *t, char *realdir, char *savedir, char *exclude)
return -1;
continue;
}
- }
+ }
closedir(dp);
free(excluded);