private File validateRelativeFile(File file) {
		File currentDirectory = currentDirectory();

		File testFile =
			new GhidraFile(currentDirectory, file.getName(), fileChooserModel.getSeparator());

		if (!testFile.exists()) {
			//
			// Handle the case where the user entered a path into the text field (which will
			// be the value of file.getName())
			//
			File testFileFullPath =
				new GhidraFile(currentDirectory, file.getPath(), fileChooserModel.getSeparator());
			if (testFileFullPath.exists()) {
				testFile = testFileFullPath;
			}
		}

		//
		// Handle the case where the current directory name can get double appended
		//
		if (!testFile.exists() && testFile.getName().equals(currentDirectory.getName())) {
			testFile = currentDirectory;
		}

		if (isFilesOnly() && isDirectory(testFile)) {
			updateDirAndSelectFile(testFile, null, false, true);
			clearUserSelection();
			return null;
		}

		return testFile;
	}
SCR 3962 - in this mode we allow the user to press Enter/OK with no text in
the text field, which means to user the current directory as the selected dir
Ghidra/Framework/Docking/src/main/java/docking/widgets/filechooser/GhidraFileChooser.java