mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-14 08:04:52 +01:00
fix all sorts of zip stuff
This commit is contained in:
@@ -78,13 +78,16 @@ export default class DownloadHandler {
|
||||
// Extraction events
|
||||
listen('extract_start', ({ payload }) => {
|
||||
// Find the download that is no extracting and set it's status as such
|
||||
const index = this.downloads.findIndex((download) => download.path === payload)
|
||||
// @ts-expect-error Too lazy to make an interface for payloads rn
|
||||
const index = this.downloads.findIndex((download) => download.path === payload.file)
|
||||
this.downloads[index].status = 'extracting'
|
||||
})
|
||||
|
||||
listen('extract_end', ({ payload }) => {
|
||||
console.log(payload)
|
||||
// Find the download that is no extracting and set it's status as such
|
||||
const index = this.downloads.findIndex((download) => download.path === payload)
|
||||
// @ts-expect-error Too lazy to make an interface for payloads rn
|
||||
const index = this.downloads.findIndex((download) => download.path === payload.file)
|
||||
this.downloads[index].status = 'finished'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@ export function unzip(
|
||||
})
|
||||
|
||||
listen('extract_end', ({ payload }) => {
|
||||
console.log(payload)
|
||||
console.log(file)
|
||||
|
||||
// @ts-expect-error Payload is an object
|
||||
if (payload?.file === file) {
|
||||
resolve(payload as UnzipPayload)
|
||||
|
||||
Reference in New Issue
Block a user