summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fileops.c b/src/fileops.c
index 5849b79b2..bc58a0572 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -480,3 +480,14 @@ int git_futils_find_global_file(git_buf *path, const char *filename)
return 0;
#endif
}
+
+int git_futils_fake_symlink(const char *old, const char *new)
+{
+ int retcode = GIT_ERROR;
+ int fd = git_futils_creat_withpath(new, 0755, 0644);
+ if (fd >= 0) {
+ retcode = p_write(fd, old, strlen(old));
+ p_close(fd);
+ }
+ return retcode;
+}