subEntry = dirAdminArea.getEntry(path.getName(), true);
}
} catch (SVNException svne) {
subEntry = null;
}
SVNFileType type = SVNFileType.getType(path);
if (subEntry != null) {
if (subEntry.getKind() == SVNNodeKind.DIR && type == SVNFileType.FILE) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Expected ''{0}'' to be a directory but found a file", path);
SVNErrorManager.error(err, SVNLogType.WC);
} else if (subEntry.getKind() == SVNNodeKind.FILE && type == SVNFileType.DIRECTORY) {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Expected ''{0}'' to be a file but found a directory", path);
SVNErrorManager.error(err, SVNLogType.WC);
}
}
File adminDir = new Resource(path, SVNFileUtil.getAdminDirectoryName());
SVNFileType wcType = SVNFileType.getType(adminDir);
if (type == SVNFileType.NONE) {
SVNErrorMessage childErr = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND, "Directory ''{0}'' is missing", path);
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_NOT_LOCKED, "Directory ''{0}'' is missing", path);
err.setChildErrorMessage(childErr);