diff options
Diffstat (limited to 'fs/cifs')
-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 77e6c4c3a88b..8dbfa97cd18c 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1802,12 +1802,18 @@ static void | |||
1802 | convert_delimiter(char *path, char delim) | 1802 | convert_delimiter(char *path, char delim) |
1803 | { | 1803 | { |
1804 | int i; | 1804 | int i; |
1805 | char old_delim; | ||
1805 | 1806 | ||
1806 | if (path == NULL) | 1807 | if (path == NULL) |
1807 | return; | 1808 | return; |
1808 | 1809 | ||
1810 | if (delim == '/') | ||
1811 | old_delim = '\\'; | ||
1812 | else | ||
1813 | old_delim = '/'; | ||
1814 | |||
1809 | for (i = 0; path[i] != '\0'; i++) { | 1815 | for (i = 0; path[i] != '\0'; i++) { |
1810 | if ((path[i] == '/') || (path[i] == '\\')) | 1816 | if (path[i] == old_delim) |
1811 | path[i] = delim; | 1817 | path[i] = delim; |
1812 | } | 1818 | } |
1813 | } | 1819 | } |