Fix file picker extension filtering
This commit is contained in:
@@ -41,12 +41,12 @@ export function onFolderChange(state, cfg, elements) {
|
||||
if (lowerPath.endsWith('.zip')) {
|
||||
try {
|
||||
const zip = await listZipFiles(file, cfg.allowedExt);
|
||||
rebaseTree(zip, rootName);
|
||||
addToFolder(zip);
|
||||
if (zip) {
|
||||
rebaseTree(zip, rootName);
|
||||
addToFolder(zip);
|
||||
}
|
||||
} catch (error) {
|
||||
addToFolder({ id: crypto.randomUUID(), kind: 'zip', name: parts.at(-1),
|
||||
path: relativePath, file, children: [], expanded: true,
|
||||
error: 'Не удалось раскрыть ZIP' });
|
||||
continue;
|
||||
}
|
||||
} else if (cfg.allowedExt.some((extension) => lowerPath.endsWith(extension))) {
|
||||
addToFolder({ id: crypto.randomUUID(), kind: 'file', name: parts.at(-1),
|
||||
|
||||
Reference in New Issue
Block a user