try {
status = client.doStatus(new File(path).getAbsoluteFile(), onServer);
} catch (SVNException e) {
if (e.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) {
File file = new File(path).getAbsoluteFile();
SVNFileType ft = SVNFileType.getType(file);
status = new SVNStatus(null, file, ft == SVNFileType.NONE ? SVNNodeKind.NONE : SVNNodeKind.UNKNOWN, null, null, null, null,
SVNStatusType.STATUS_UNVERSIONED, SVNStatusType.STATUS_NONE,
SVNStatusType.STATUS_NONE, SVNStatusType.STATUS_NONE,
false, false, false, null, null, null, null, null, null,
null, null, null);