symlink: convert windows slashes when setting symlink

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2010-10-15 14:49:43 -04:00 committed by unknown
parent 1ad1c0f262
commit 59526ba9d8
2 changed files with 5 additions and 1 deletions

View file

@ -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 */