提交 bf82450e authored 作者: Thomas Mueller's avatar Thomas Mueller

Don't create a *.h2.db file when using the MVStore

上级 114b107f
...@@ -385,7 +385,13 @@ public class ConnectionInfo implements Cloneable { ...@@ -385,7 +385,13 @@ public class ConnectionInfo implements Cloneable {
if (persistent) { if (persistent) {
if (nameNormalized == null) { if (nameNormalized == null) {
String suffix = Constants.SUFFIX_PAGE_FILE; String suffix = Constants.SUFFIX_PAGE_FILE;
String n = FileUtils.toRealPath(name + suffix); String n;
if (FileUtils.exists(name + suffix)) {
n = FileUtils.toRealPath(name + suffix);
} else {
suffix = Constants.SUFFIX_MV_FILE;
n = FileUtils.toRealPath(name + suffix);
}
String fileName = FileUtils.getName(n); String fileName = FileUtils.getName(n);
if (fileName.length() < suffix.length() + 1) { if (fileName.length() < suffix.length() + 1) {
throw DbException.get(ErrorCode.INVALID_DATABASE_NAME_1, name); throw DbException.get(ErrorCode.INVALID_DATABASE_NAME_1, name);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论