# [PATCH] create subdirs for symlinks

1 messages from 2005-05-05 to 2005-05-05. Participants: Kay Sievers.
Thread: https://gitlist.dev/t/494

## Kay Sievers, 2005-05-05 23:34

Subject: [PATCH] create subdirs for symlinks
Message-ID: <20050505233410.GA1852@vrfy.org>
URL: https://gitlist.dev/e/20050505233410.GA1852%40vrfy.org

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

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
---

--- 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)",


```
