diff --git a/daemon/symlink.c b/daemon/symlink.c index 68f8426..f54c1e3 100644 --- a/daemon/symlink.c +++ b/daemon/symlink.c @@ -225,6 +225,10 @@ int handle_symlink(nfs41_upcall *upcall) int status = NO_ERROR; if (args->set) { + /* don't send windows slashes to the server */ + char *p; + for (p = args->target_set; *p; p++) if (*p == '\\') *p = '/'; + if (state->file.fh.len) { /* the check in handle_open() didn't catch that we're creating * a symlink, so we have to remove the file it already created */ diff --git a/daemon/upcall.h b/daemon/upcall.h index 4215e75..fe47df5 100644 --- a/daemon/upcall.h +++ b/daemon/upcall.h @@ -137,7 +137,7 @@ typedef struct __readdir_upcall_args { typedef struct __symlink_upcall_args { nfs41_abs_path target_get; - const char *target_set; + char *target_set; nfs41_root *root; nfs41_open_state *state; const char *path;