Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping error when mapping to a directory with spaces in the name #24

Open
herao67 opened this issue May 12, 2022 · 0 comments
Open

Mapping error when mapping to a directory with spaces in the name #24

herao67 opened this issue May 12, 2022 · 0 comments

Comments

@herao67
Copy link

herao67 commented May 12, 2022

Hi, when we try to map to a directory with spaces in the name, e.g. \\servername.domain.com\folder1\some folder we got an error The specified network resource or device is no longer available.

The reason for that is that suddenly there are quotes around the directory name and the Trim functions in /flexvolume/windows/plugins/microsoft.com~smb.cmd/flexvolume.ps1 do not work correctly. The @JSON variable contains a beginning quote, but not ending one.

We fixed it with two edits. One in line 241, adding another Trim at the end:

$escapedJson = $all.Substring($command.Length).Trim().SubString($folder.Length).Trim('" ')

and secondly with adding quotes around the remotepath in line 128:

cmd /c "mklink /D $symlink `"$remotepath`"" 2>&1  | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant