NationalSecurityAgency/ghidra · error · IOException
Commit directory does not exist: {}
Error message
Commit directory does not exist: {} What it means
Thrown as IOException by checkDirectory() when the path given to commitsigs or commitupdates does not exist on the filesystem. Unlike the IllegalArgumentException argument-parsing errors, this is an I/O failure discovered when validating the directory that contains the signature/update XML files to be sent to the BSim server.
Source
Thrown at Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BSimLaunchable.java:666
}
try (BulkSignatures bsim = getBulkSignatures()) {
if (commitOption) {
// Generate and commit updates to BSim database
bsim.updateRepoSignatures(ghidraURL, xmlDirectory, overwriteOption, monitor);
}
else {
// Generate update XML files only
bsim.generateUpdatesFromServer(ghidraURL, xmlDirectory, overwriteOption,
configOption, monitor);
}
}
}
private File checkDirectory(String dirPath) throws IOException {
File dir = new File(dirPath);
if (!dir.exists()) {
throw new IOException("Commit directory does not exist: " + dirPath);
}
if (!dir.isDirectory()) {
throw new IOException(dirPath + ": is not a directory");
}
return dir.getCanonicalFile();
}
private void doCommitSigs(List<String> params, TaskMonitor monitor)
throws IOException, SAXException, LSHException, CancelledException {
if (params.size() < 1) {
throw new IllegalArgumentException("Missing directory containing signature files");
}
String xmlDirectory = params.get(0);
File dir = checkDirectory(xmlDirectory);
boolean hasOverride = optionValueMap.containsKey(OVERRIDE_OPTION);View on GitHub (pinned to d5f144c24d)
Solutions
- Verify the directory exists: 'ls -la <dirPath>' before running the command.
- Use an absolute path to avoid CWD ambiguity.
- Re-run generatesigs/generateupdates to recreate the XML files if the directory was deleted.
- Create the directory first if you intended to point at a fresh location, then populate it.
Example fix
# before bsim commitsigs postgresql://myhost/BsimDB /tmp/xmout # after (fix typo) bsim commitsigs postgresql://myhost/BsimDB /tmp/xmlout
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check directory existence before calling run()
import java.io.File;
File dir = new File(dirPath);
if (!dir.exists()) {
throw new IOException("Commit directory does not exist: " + dirPath);
}
if (!dir.isDirectory()) {
throw new IOException(dirPath + ": is not a directory");
} Try / catch
// In a calling program wrapping BSimLaunchable
try {
launchable.launch(layout, params);
} catch (Exception e) {
// IOException for FS problems exits with code 1; IllegalArgumentException with 22
if (e instanceof IOException) {
log.error("Filesystem error during BSim commit: {}", e.getMessage());
}
throw e;
} Prevention
- Always verify the XML output directory exists immediately before commitsigs/commitupdates.
- Use absolute paths in scripts to avoid CWD-related surprises.
- If generating and committing in one script, check the generatesigs/generateupdates exit code before proceeding to commit.
When it happens
Trigger: Running commitsigs or commitupdates with a path where new File(dirPath).exists() returns false (line 665). The path was never created, is misspelled, or points to a different working directory.
Common situations: Typo in the directory path; relative path evaluated from an unexpected CWD; the directory was cleaned up between generatesigs and commitsigs steps; Docker/container path mismatch; NFS mount not yet available.
Related errors
- {}: is not a directory
- Missing directory containing signature files
- Missing directory containing update files
- %s: error: @-file refers to a directory\n
- Unknown command: {}
AI-assisted analysis of NationalSecurityAgency/ghidra@d5f144c24d (2026-08-14).
Data as JSON: /api/errors/28186796eb5f22fc.
Report an issue: GitHub.