{"record":{"id":"d9d1b7c4ebca306b","repo":"ajeetdsouza/zoxide","slug":"not-a-directory-path","errorCode":null,"errorMessage":"not a directory: {path}","messagePattern":"not a directory: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/cmd/add.rs","lineNumber":34,"sourceCode":"        let max_age = config::maxage()?;\n        let now = util::current_time()?;\n\n        let mut db = Database::open()?;\n\n        for path in &self.paths {\n            let path =\n                if config::resolve_symlinks() { util::canonicalize } else { util::resolve_path }(\n                    path,\n                )?;\n            let path = util::path_to_str(&path)?;\n\n            // Ignore path if it contains unsupported characters, or if it's in the exclude\n            // list.\n            if path.contains(EXCLUDE_CHARS) || exclude_dirs.iter().any(|glob| glob.matches(path)) {\n                continue;\n            }\n            if !Path::new(path).is_dir() {\n                bail!(\"not a directory: {path}\");\n            }\n\n            let by = self.score.unwrap_or(1.0);\n            db.add_update(path, by, now);\n        }\n\n        if db.dirty() {\n            db.age(max_age);\n        }\n        db.save()\n    }\n}\n","sourceCodeStart":16,"sourceCodeEnd":47,"githubUrl":"https://github.com/ajeetdsouza/zoxide/blob/8a3f76da90cc12547b593ca210b8fdfb1631d07f/src/cmd/add.rs#L16-L47","documentation":"Error \"not a directory: {path}\" thrown in ajeetdsouza/zoxide.","triggerScenarios":"Thrown at src/cmd/add.rs:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a path to a directory, not a regular file","Check the path with 'ls -ld <path>' and correct it"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8a3f76da90cc12547b593ca210b8fdfb1631d07f","analyzedAt":"2026-08-19T03:25:13.308Z","contentChangedAt":"2026-08-19T03:25:13.308Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}