Browse Source

[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>
maint
Kay Sievers 20 years ago committed by Linus Torvalds
parent
commit
d5f415e6f5
  1. 1
      checkout-cache.c

1
checkout-cache.c

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