{"record":{"id":"2ef1e7fc4fc0ca83","repo":"tonhowtf/omniget","slug":"formato-de-pacote-desconhecido","errorCode":null,"errorMessage":"formato de pacote desconhecido: {}","messagePattern":"formato de pacote desconhecido: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/github.rs","lineNumber":150,"sourceCode":"            std::io::copy(&mut file, &mut w)?;\n        }\n        Ok(())\n    } else if name.ends_with(\".tar.gz\") || name.ends_with(\".tgz\") {\n        let decoder = flate2::read::GzDecoder::new(std::io::Cursor::new(data));\n        let mut archive = tar::Archive::new(decoder);\n        archive.set_preserve_permissions(true);\n        archive\n            .unpack(dest)\n            .map_err(|e| anyhow!(\"tar.gz invalido: {}\", e))\n    } else if name.ends_with(\".tar.xz\") {\n        let decoder = xz2::read::XzDecoder::new(std::io::Cursor::new(data));\n        let mut archive = tar::Archive::new(decoder);\n        archive.set_preserve_permissions(true);\n        archive\n            .unpack(dest)\n            .map_err(|e| anyhow!(\"tar.xz invalido: {}\", e))\n    } else {\n        Err(anyhow!(\"formato de pacote desconhecido: {}\", name))\n    }\n}\n\n/// Procura um arquivo pelo nome dentro de uma árvore (os zips do whisper.cpp\n/// e do Real-ESRGAN têm subpastas diferentes por plataforma).\npub fn find_file(root: &Path, file_name: &str) -> Option<PathBuf> {\n    let mut stack = vec![root.to_path_buf()];\n    while let Some(dir) = stack.pop() {\n        let Ok(rd) = std::fs::read_dir(&dir) else {\n            continue;\n        };\n        for entry in rd.flatten() {\n            let p = entry.path();\n            if p.is_dir() {\n                stack.push(p);\n            } else if p.file_name().map(|n| n == file_name).unwrap_or(false) {\n                return Some(p);\n            }","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/github.rs#L132-L168","documentation":"Fall-through guard at the end of the GitHub asset unpacker: unpack() recognizes .zip, .tar.gz/.tgz and .tar.xz extensions; if the asset file name matches none of these known package formats it bails out with this error, carrying the offending file name in {}. It fires when a release asset has an unexpected or unsupported extension (or no recognizable extension at all).","triggerScenarios":"Thrown at src-tauri/omniget-core/src/core/tools/github.rs:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Download an asset with a supported extension (zip/tar.gz/tar.xz)","Add a new suffix branch with the matching decompressor before shipping a new format","Rename locally-unpacked artifacts if the server serves the same bytes under an odd name"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}