{"record":{"id":"4a90e3005006a75a","repo":"tonhowtf/omniget","slug":"nao-achei-o-caminho-do-export","errorCode":null,"errorMessage":"nao achei o caminho do export: {}","messagePattern":"nao achei o caminho do export: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/linkedin/source.rs","lineNumber":47,"sourceCode":"    norm(stem)\n}\n\nfn is_csv(name: &str) -> bool {\n    name.to_ascii_lowercase().ends_with(\".csv\")\n}\n\n/// Tudo que o export tem dentro, arquivo por arquivo (inclui imagens), para\n/// o inventario e para a checagem de foto de perfil.\npub struct Opened {\n    pub source: Source,\n    pub entries: Vec<String>,\n}\n\nimpl Source {\n    pub fn open(path: &str) -> Result<Opened> {\n        let p = Path::new(path);\n        if !p.exists() {\n            return Err(anyhow!(\"nao achei o caminho do export: {}\", path));\n        }\n        let mut entries = Vec::new();\n        let source = if p.is_dir() {\n            let mut files = HashMap::new();\n            for e in walkdir::WalkDir::new(p)\n                .max_depth(4)\n                .into_iter()\n                .filter_map(std::result::Result::ok)\n            {\n                if !e.file_type().is_file() {\n                    continue;\n                }\n                let name = e.file_name().to_string_lossy().to_string();\n                let rel = e\n                    .path()\n                    .strip_prefix(p)\n                    .unwrap_or(e.path())\n                    .to_string_lossy()","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/linkedin/source.rs#L29-L65","documentation":"Source::open is the entry point for ingesting a LinkedIn data export (a zip or an extracted directory). Before doing any parsing it checks Path::exists on the user-supplied path; if the path does not exist on disk it returns this error immediately.","triggerScenarios":"Calling Source::open with a path string that does not exist: a typo, a path that was moved/deleted, a relative path resolved against the wrong working directory, or a downloaded zip that was never actually saved.","commonSituations":"User passes the browser's download page URL instead of the file path; the export zip was deleted after extraction; running the tool from a different cwd so relative paths break; Windows-style path used verbatim on Unix.","solutions":["Echo the path value from the error and confirm it exists: run `ls <path>` (or `ls -la` for the parent) in the same environment/cwd the app runs in.","Pass an absolute path to the LinkedIn export zip or the extracted folder instead of a relative path.","Re-download the export from LinkedIn (Settings & Privacy > Get a copy of your data) if the file was deleted or never finished downloading.","Check for encoding issues: spaces or unicode characters in the filename may need quoting/escaping depending on how the path reaches open()."],"exampleFix":"// before\nSource::open(\"~/Downloads/LinkedIn export\")?; // typo / never downloaded\n\n// after\nlet p = std::path::Path::new(\"/home/me/Downloads/linkedin_export.zip\");\nassert!(p.exists(), \"re-download the export first\");\nSource::open(p.to_str().unwrap())?;","handlingStrategy":"validation","validationCode":"let p = std::path::PathBuf::from(user_path);\nlet p = shellexpand::tilde(&user_path).map(|s| std::path::PathBuf::from(s.as_ref()))?;\nanyhow::ensure!(p.exists(), \"export path does not exist: {}\", p.display());","typeGuard":null,"tryCatchPattern":"match Source::open(&path) {\n    Err(e) if e.to_string().contains(\"nao achei o caminho\") => {\n        eprintln!(\"Path '{}' not found; pass the LinkedIn export zip's full path\", path);\n    }\n    r => r?,\n}","preventionTips":["Always pass absolute paths, never relative ones","Expand ~ and env vars before calling open()","Check std::path::Path::exists in the UI before invoking the tool"],"tags":["path","filesystem","linkedin","input-validation"],"backgroundTag":"file-not-found","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"}