[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:
parent
42ea9cb286
commit
d5f415e6f5
@ -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)",
|
||||
|
Loading…
Reference in New Issue
Block a user