[PATCH 1/2] fixup! tmp-objdir: new API for creating temporary writable databases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Neeraj Singh <neerajsi@xxxxxxxxxxxxx>

Fix prune code to be able to delete multiple object directories. I
wasn't properly resetting the strbuf with the path.

Signed-off-by: Neeraj Singh <neerajsi@xxxxxxxxxxxxx>
---
 builtin/prune.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/builtin/prune.c b/builtin/prune.c
index 9c72ecf5a58..6b6b0c7b011 100644
--- a/builtin/prune.c
+++ b/builtin/prune.c
@@ -31,6 +31,7 @@ static int prune_tmp_file(const char *fullpath)
 		if (show_only || verbose)
 			printf("Removing stale temporary directory %s\n", fullpath);
 		if (!show_only) {
+			strbuf_reset(&remove_dir_buf);
 			strbuf_addstr(&remove_dir_buf, fullpath);
 			remove_dir_recursively(&remove_dir_buf, 0);
 		}
-- 
gitgitgadget




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux