mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-16 09:04:45 +01:00
solution for loose file mods
This commit is contained in:
@@ -6,12 +6,18 @@ interface UnzipPayload {
|
||||
new_folder: string
|
||||
}
|
||||
|
||||
export function unzip(file: string, dest: string, topLevelStrip?: boolean): Promise<UnzipPayload> {
|
||||
export function unzip(
|
||||
file: string,
|
||||
dest: string,
|
||||
topLevelStrip?: boolean,
|
||||
folderIfLoose?: boolean
|
||||
): Promise<UnzipPayload> {
|
||||
return new Promise((resolve) => {
|
||||
invoke('unzip', {
|
||||
zipfile: file,
|
||||
destpath: dest,
|
||||
topLevelStrip,
|
||||
folderIfLoose,
|
||||
})
|
||||
|
||||
listen('extract_end', ({ payload }) => {
|
||||
|
||||
Reference in New Issue
Block a user