fixed typo

This commit is contained in:
4nshuman
2024-10-06 15:26:26 +05:30
parent dfe71d5965
commit a9bebdd7f0
+2 -2
View File
@@ -1201,11 +1201,11 @@ function UIItem(options){
html: i18n('unzip'),
onClick: async function(){
const zip = new JSZip();
let filPath = $(el_item).attr('data-path');
let filePath = $(el_item).attr('data-path');
let file = puter.fs.read($(el_item).attr('data-path'));
zip.loadAsync(file).then(async function (zip) {
const rootdir = await puter.fs.mkdir(path.dirname(filPath) + '/' + path.basename(filPath, '.zip'), {dedupeName: true});
const rootdir = await puter.fs.mkdir(path.dirname(filePath) + '/' + path.basename(filePath, '.zip'), {dedupeName: true});
Object.keys(zip.files).forEach(async function (filename) {
if(filename.endsWith('/'))
await puter.fs.mkdir(rootdir.path +'/' + filename, {createMissingParents: true});