symlink: convert windows slashes when setting symlink
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
1ad1c0f262
commit
59526ba9d8
2 changed files with 5 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue