[PATCH] create subdirs for symlinks

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

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Kay Sievers 2005-05-06 01:34:10 +02:00 committed by Linus Torvalds
parent 42ea9cb286
commit d5f415e6f5

View file

@ -96,6 +96,7 @@ static int write_entry(struct cache_entry *ce, const char *path)
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)",