Commit f1eab13f authored by mercury233's avatar mercury233

fix single quote in user dir name

parent 395d8f51
Pipeline #15346 passed with stages
in 3 minutes and 4 seconds
......@@ -1012,8 +1012,14 @@ export class AppsService {
if(process.platform === 'darwin') {
tarArgs.unshift(`--use-compress-program=${this.systemBinPath('zstd')}`)
}
let windowsArgumentsQuoted: boolean = false;
if ((file.includes('\'') || dir.includes('\'')) && process.platform === 'win32') {
windowsArgumentsQuoted = true;
tarArgs[1] = `"${file}"`;
tarArgs[3] = `"${dir}"`;
}
Logger.info('Start to extract... Command Line: ' + this.tarPath, tarArgs.join(' '));
let tarProcess = child_process.spawn(this.tarPath, tarArgs);
let tarProcess = child_process.spawn(this.tarPath, tarArgs, { windowsVerbatimArguments: windowsArgumentsQuoted });
let rl = readline.createInterface({
input: this.getTarStream(tarProcess),
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment