Hi!
I have an issue calling mount_smbfs with a user from a specific domain. A sample shell call is
mount_smbfs -N -o nodev,nosuid "//DOMAIN;USER:PASS@SERVER_ADDRESS" /SOMEPATH
Using the code below I get an invalid command because the semicolon ends the command in shell.
var server = "//DOMAIN;USER:PASS@SERVER_ADDRESS"
let remotePath = "/REMOTEPATH"
let localPath = "/LOCALPATH"
let cmd = Process()
cmd.executableURL = URL(fileURLWithPath: "/sbin/mount_smbfs")
cmd.arguments = ["-N", "-o nodev,nosuid", "\(server)\(remotePath)", localPath]
Using a quoted semicolon
var server = "//DOMAIN\;USER:PASS@SERVER_ADDRESS"
does also not work, because the backslash is quoted to DOMAIN\\;USER automatically via Process class. So I end up with two backslash.
Using quotes did also not work for me.
Any clue how to solve this issue?