mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-04-11 14:19:38 +00:00
Prevent error message for rimraf
This commit is contained in:
@@ -46,7 +46,6 @@ export class DownloadsModalComponent {
|
|||||||
switch (download.type) {
|
switch (download.type) {
|
||||||
case 'good': return 'unset'
|
case 'good': return 'unset'
|
||||||
case 'done': return 'unset'
|
case 'done': return 'unset'
|
||||||
case 'warning': return 'yellow'
|
|
||||||
case 'error': return 'indianred'
|
case 'error': return 'indianred'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,9 @@ export class ChartDownload {
|
|||||||
const cancelFn = this.cancelFn
|
const cancelFn = this.cancelFn
|
||||||
this.cancelFn = undefined
|
this.cancelFn = undefined
|
||||||
cancelFn()
|
cancelFn()
|
||||||
rimraf(this.chartPath) // Delete temp folder
|
try {
|
||||||
|
rimraf(this.chartPath) // Delete temp folder
|
||||||
|
} catch (e) { /** Do nothing */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class DownloadHandler implements IPCEmitHandler<'download'> {
|
|||||||
|
|
||||||
private startNextDownload() {
|
private startNextDownload() {
|
||||||
if (!this.downloadQueue.isEmpty()) {
|
if (!this.downloadQueue.isEmpty()) {
|
||||||
this.currentDownload = this.downloadQueue.pop()
|
this.currentDownload = this.downloadQueue.shift()
|
||||||
if (this.currentDownload.hasFailed) {
|
if (this.currentDownload.hasFailed) {
|
||||||
this.currentDownload.retry()
|
this.currentDownload.retry()
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export class DownloadQueue {
|
|||||||
this.sort()
|
this.sort()
|
||||||
}
|
}
|
||||||
|
|
||||||
pop() {
|
shift() {
|
||||||
return this.downloadQueue.shift()
|
return this.downloadQueue.shift()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,4 @@ export interface DownloadProgress {
|
|||||||
type: ProgressType
|
type: ProgressType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProgressType = 'good' | 'warning' | 'error' | 'cancel' | 'done' | 'fastUpdate'
|
export type ProgressType = 'good' | 'error' | 'cancel' | 'done' | 'fastUpdate'
|
||||||
// export function downloadSorter(p1: DownloadProgress, p2: DownloadProgress) {
|
|
||||||
// return 0
|
|
||||||
// // return p1 - p2 // negative if p1 < p2
|
|
||||||
// }
|
|
||||||
Reference in New Issue
Block a user