提交 26f02d9c authored 作者: Thomas Mueller's avatar Thomas Mueller

MVStore: use RandomAccessFile file system if the file name starts with "file:".

上级 ad3f0cf7
...@@ -129,9 +129,11 @@ public class FileStore { ...@@ -129,9 +129,11 @@ public class FileStore {
return; return;
} }
if (fileName != null) { if (fileName != null) {
if (FilePath.get(fileName) instanceof FilePathDisk) { FilePath p = FilePath.get(fileName);
// NIO is used, unless a different file system is specified the // if no explicit scheme was specified, NIO is used
// following line is to ensure the NIO file system is compiled if (p instanceof FilePathDisk &&
!fileName.startsWith(p.getScheme() + ":")) {
// ensure the NIO file system is registered
FilePathNio.class.getName(); FilePathNio.class.getName();
fileName = "nio:" + fileName; fileName = "nio:" + fileName;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论