threads / patch / 494

patchcreate subdirs for symlinks

Subject: [PATCH] create subdirs for symlinks

## tl;dr

One message between May 5, 2005 and May 5, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Kay Sievers· May 5, 2005, 23:34 UTC · lore

We may need to create subdirectories, before we can create a symlink.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---
Show changes to checkout-cache.c +1 −0
--- a/checkout-cache.c
+++ b/checkout-cache.c
@@ -96,6 +96,7 @@ static int write_entry(struct cache_entr
 	case S_IFLNK:
 		memcpy(target, new, size);
 		target[size] = '\0';
+		create_directories(path);
 		if (symlink(target, path)) {
 			free(new);
 			return error("checkout-cache: unable to create symlink %s (%s)",

← back to recent threads