{"record":{"id":"1dc1a3defe8757c1","repo":"oven-sh/bun","slug":"tried-to-delete-root-and-stopped-it","errorCode":null,"errorMessage":"Tried to delete root and stopped it","messagePattern":"Tried to delete root and stopped it","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/install/extract_tarball.rs","lineNumber":514,"sourceCode":"                    directories::cached_github_folder_name_print(\n                        &mut bufs.folder_name_buf,\n                        resolved,\n                        None,\n                    )\n                    .as_bytes()\n                }\n                ResolutionTag::LocalTarball | ResolutionTag::RemoteTarball => {\n                    directories::cached_tarball_folder_name_print(\n                        &mut bufs.folder_name_buf,\n                        self.url.slice(),\n                        None,\n                    )\n                    .as_bytes()\n                }\n                _ => unreachable!(),\n            };\n            if folder_name.is_empty() || (folder_name.len() == 1 && folder_name[0] == b'/') {\n                panic!(\"Tried to delete root and stopped it\");\n            }\n            let cache_dir = Dir::borrow(&self.cache_dir);\n\n            // e.g. @next\n            // if it's a namespace package, we need to make sure the @name folder exists\n            let create_subdir = basename.len() != name.len() && !self.resolution.tag.is_git();\n\n            // Now that we've extracted the archive, we rename.\n            #[cfg(windows)]\n            {\n                // Windows EBUSY/SHARING_VIOLATION on `NtSetInformationFile` is\n                // transient when a concurrent process (another `bun install`\n                // sharing the cache, AV, the Search Indexer) is closing its\n                // handle to the destination. Back off briefly between retries.\n                const MAX_RETRIES: u32 = 4;\n                let mut retries: u32 = 0;\n                let mut path2_buf = WPathBuffer::uninit();\n                let path2 = strings::to_wpath_normalized(&mut path2_buf, folder_name);","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/install/extract_tarball.rs#L496-L532","documentation":"Error \"Tried to delete root and stopped it\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at src/install/extract_tarball.rs:514 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}