Skip to content

Commit

Permalink
[PATCH] create subdirs for symlinks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kay Sievers authored and Linus Torvalds committed May 5, 2005
1 parent 42ea9cb commit d5f415e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions checkout-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down

0 comments on commit d5f415e

Please sign in to comment.