fileMode = on && !off;
} else {
fileMode = false;
}
SymLinks symLinks = SymLinks.FALSE;
if (getFS().supportsSymlinks()) {
File tmp = new File(getDirectory(), "tmplink"); //$NON-NLS-1$
try {
getFS().createSymLink(tmp, "target"); //$NON-NLS-1$
symLinks = null;
FileUtils.delete(tmp);
} catch (IOException e) {
// Normally a java.nio.file.FileSystemException
}
}
if (symLinks != null)
cfg.setString(ConfigConstants.CONFIG_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_SYMLINKS, symLinks.name()
.toLowerCase());
cfg.setInt(ConfigConstants.CONFIG_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION, 0);
cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
ConfigConstants.CONFIG_KEY_FILEMODE, fileMode);