} else if (file.canWrite()) {
} else {
    public static boolean setReadonly(File file, boolean readonly) {        if (!file.exists()) {            return false;        }        if (readonly) {            return file.setReadOnly();        }        if (file.canWrite()) {            return true;        }        try {            if (file.length() < 1024*100) {                // faster way for small files.                File tmp = createUniqueFile(file.getParentFile(), file.getName(), ".ro");                copyFile(file, tmp, false);                copyFile(tmp, file, false);                deleteFile(tmp);            } else if (file.canWrite()) {                if (isWindows) {                    Process p = Runtime.getRuntime().exec(ATTRIB_COMMAND + " -R \"" + file.getAbsolutePath() + "\"");                    p.waitFor();                } else {                    execCommand(new String[] { CHMOD_COMMAND, "ugo+w", file.getAbsolutePath() });                }            }        } catch (Throwable th) {            SVNDebugLog.getDefaultLog().info(th);            return false;        }        return true;    }