summaryrefslogtreecommitdiff
path: root/builtin/prune-packed.c
diff options
context:
space:
mode:
authorJiang Xin <worldhello.net@gmail.com>2012-03-16 12:18:07 (GMT)
committerJiang Xin <worldhello.net@gmail.com>2012-03-16 12:18:07 (GMT)
commitd90b16ed421eb51fc4d7c6bda5f3332cc2e3aece (patch)
tree2d90d25ecbe794492f0fb267f31af8a1f646327d /builtin/prune-packed.c
parent6672dc8e694f412090417a95cd6cd4b2b5be6da1 (diff)
parent0e2d57fd50f61e668be3180bc8f25991ea88aa8c (diff)
downloadgit-d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece.zip
git-d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece.tar.gz
git-d90b16ed421eb51fc4d7c6bda5f3332cc2e3aece.tar.bz2
Merge v1.7.10-rc0 for git l10n update
Diffstat (limited to 'builtin/prune-packed.c')
-rw-r--r--builtin/prune-packed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index f9463de..b58a2e1 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -35,8 +35,6 @@ static void prune_dir(int i, DIR *dir, char *pathname, int len, int opts)
unlink_or_warn(pathname);
display_progress(progress, i + 1);
}
- pathname[len] = 0;
- rmdir(pathname);
}
void prune_packed_objects(int opts)
@@ -65,6 +63,8 @@ void prune_packed_objects(int opts)
continue;
prune_dir(i, d, pathname, len + 3, opts);
closedir(d);
+ pathname[len + 2] = '\0';
+ rmdir(pathname);
}
stop_progress(&progress);
}