Commit 3c1899e9 authored by mercury233's avatar mercury233

use tempImportFile

parent 396f1df7
Pipeline #15397 passed with stages
in 3 minutes and 27 seconds
......@@ -216,10 +216,16 @@ export class AppDetailComponent implements OnInit, OnChanges {
let ext = path.extname(this.import_path);
if (ext === '.zst') {
try {
targetApp.status.status = 'installing';
if(this.import_path.includes(' ') && this.import_path.match(/[^\x00-\x7F]/)) {
console.log('import file name contains non-ascii, coping to temp file');
let tempImportFile = path.join(option.installLibrary, 'downloading', 'import.zst');
await this.appsService.copyFile(this.import_path, tempImportFile);
this.import_path = tempImportFile;
}
console.log('extracting import file');
await this.appsService.createDirectory(option.installDir);
await new Promise((resolve, reject) => {
targetApp.status.status = 'installing';
this.appsService.extract(this.import_path, option.installDir).subscribe(
(lastItem: string) => {
targetApp.status.progressMessage = lastItem;
......
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