fixed a bug on extract of zip file
This commit is contained in:
@@ -652,7 +652,6 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
|||||||
if (er.includes('SAFESIDE')) {
|
if (er.includes('SAFESIDE')) {
|
||||||
this.appService.headerComponent.safeModal.openModal();
|
this.appService.headerComponent.safeModal.openModal();
|
||||||
}
|
}
|
||||||
console.log('app failed', er);
|
|
||||||
task.status =
|
task.status =
|
||||||
(task.app_name ? task.app_name + ': ' : '') +
|
(task.app_name ? task.app_name + ': ' : '') +
|
||||||
(e.message ? e.message : e.code ? e.code : e.reason ? e.reason : e.toString());
|
(e.message ? e.message : e.code ? e.code : e.reason ? e.reason : e.toString());
|
||||||
@@ -1036,7 +1035,7 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
|||||||
async installLocalZip(filepath, dontCatchError, cb, task?, deleteAfter?) {
|
async installLocalZip(filepath, dontCatchError, cb, task?, deleteAfter?) {
|
||||||
const typeBasedActions = {
|
const typeBasedActions = {
|
||||||
'.apk': filepath => {
|
'.apk': filepath => {
|
||||||
this.installAPK(filepath, true, false, 0, 0, deleteAfter, this.appService.path.basename(filepath));
|
this.installAPK(filepath, true, false, 0, 0, deleteAfter, this.appService.path.basename(filepath) + ': ');
|
||||||
},
|
},
|
||||||
'.obb': filepath => {
|
'.obb': filepath => {
|
||||||
if (this.appService.path.basename(filepath).match(this.obbRegex)) {
|
if (this.appService.path.basename(filepath).match(this.obbRegex)) {
|
||||||
@@ -1061,10 +1060,6 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
|||||||
{ dir: this.appService.path.join(this.appService.appData, 'tmp') },
|
{ dir: this.appService.path.join(this.appService.appData, 'tmp') },
|
||||||
extractErr => {
|
extractErr => {
|
||||||
if (!extractErr) {
|
if (!extractErr) {
|
||||||
if (task) {
|
|
||||||
task.status = 'Extracted Zip!';
|
|
||||||
}
|
|
||||||
resolve();
|
|
||||||
this.appService.fs.readdir(this.appService.path.join(this.appService.appData, 'tmp'), (readErr, files) => {
|
this.appService.fs.readdir(this.appService.path.join(this.appService.appData, 'tmp'), (readErr, files) => {
|
||||||
let installableFiles = files.filter((val, index) => {
|
let installableFiles = files.filter((val, index) => {
|
||||||
return Object.keys(typeBasedActions).includes(this.appService.path.extname(val));
|
return Object.keys(typeBasedActions).includes(this.appService.path.extname(val));
|
||||||
@@ -1078,6 +1073,12 @@ This can sometimes be caused by changes to your hosts file. Don't make changes u
|
|||||||
this
|
this
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (task) {
|
||||||
|
task.status = installableFiles.length ? 'Extracted Zip!' : 'No installable files in this zip...';
|
||||||
|
task.failed = !installableFiles.length;
|
||||||
|
}
|
||||||
|
resolve();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.warn(extractErr);
|
console.warn(extractErr);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
.menu-chip{
|
.menu-chip{
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,7 +276,7 @@
|
|||||||
Thank you and have a great day!
|
Thank you and have a great day!
|
||||||
</mz-modal-content>
|
</mz-modal-content>
|
||||||
<mz-modal-footer>
|
<mz-modal-footer>
|
||||||
<div class="pure-material-button-contained" (click)="safeModal.closeModal(); ">Back to Safety</div>
|
<div class="pure-material-button-contained spaced" (click)="safeModal.closeModal(); ">Back to Safety</div>
|
||||||
</mz-modal-footer>
|
</mz-modal-footer>
|
||||||
</mz-modal>
|
</mz-modal>
|
||||||
|
|
||||||
|
|||||||
@@ -113,9 +113,7 @@ export class ProcessBucketService {
|
|||||||
this.currentTask = null;
|
this.currentTask = null;
|
||||||
this.statusService.showStatus(task.status, true);
|
this.statusService.showStatus(task.status, true);
|
||||||
if (!task.cancelled) {
|
if (!task.cancelled) {
|
||||||
console.log('h1');
|
|
||||||
return timeout().then(async () => {
|
return timeout().then(async () => {
|
||||||
console.log('h2');
|
|
||||||
await this.processBucket();
|
await this.processBucket();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ body{
|
|||||||
|
|
||||||
.chip>i {
|
.chip>i {
|
||||||
float: left;
|
float: left;
|
||||||
margin: 0 8px 0 -8px;
|
margin: 0 8px 0 0px;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|||||||
Reference in New Issue
Block a user