diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 77e6c4c..8dbfa97 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -1802,12 +1802,18 @@ static void convert_delimiter(char *path, char delim) { int i; + char old_delim; if (path == NULL) return; + if (delim == '/') + old_delim = '\\'; + else + old_delim = '/'; + for (i = 0; path[i] != '\0'; i++) { - if ((path[i] == '/') || (path[i] == '\\')) + if (path[i] == old_delim) path[i] = delim; } } |