mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-29 09:18:26 +03:00
handle windows usernames with spaces - fixed #2944
This commit is contained in:
parent
7da941d038
commit
f1ecbd1a93
@ -116,8 +116,9 @@ export class SSHService {
|
|||||||
'ssh-keygen.exe',
|
'ssh-keygen.exe',
|
||||||
)
|
)
|
||||||
await execFile('icacls', [temp.path, '/inheritance:r'])
|
await execFile('icacls', [temp.path, '/inheritance:r'])
|
||||||
let sid = await execFile('whoami', ['/user', '/nh'])
|
let sid = await execFile('whoami', ['/user', '/nh', '/fo', 'csv'])
|
||||||
sid = sid[0].split(' ')[0]
|
sid = sid[0].split(',')[0]
|
||||||
|
sid = sid.substring(1, sid.length - 1)
|
||||||
await execFile('icacls', [temp.path, '/grant:r', `${sid}:(R,W)`])
|
await execFile('icacls', [temp.path, '/grant:r', `${sid}:(R,W)`])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user