LiteDB 是否支持连接字符串中的长文件名(>=260 个字符)

Does LiteDB support long file names (>=260 char) in the connection string

我使用 litedb 作为文件索引,借此重新创建文件共享的目录结构,并将 litedb.db 文件放入层次结构中的每个目录中。我遇到的问题似乎是目录结构的长度超过 260 个字符(请参阅下面的错误消息)。连接到 litedb 时,有没有办法在连接字符串中启用对长文件名的支持?或者有没有办法使用其他方法(例如 file.open AlphaFS)来实例化我的 litedb 实例。

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\......\Some deep directory which is 260+ characters long\index.db'.
  at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
  at LiteDB.FileDiskService.Initialize(Logger log, String password)
  at LiteDB.LiteEngine..ctor(IDiskService disk, String password, Nullable`1 timeout, Int32 cacheSize, Logger log, Boolean utcDate)
  at LiteDB.LiteDatabase.<>c__DisplayClass11_0.<.ctor>b__0()
  at LiteDB.LazyLoad`1.get_Value()
  at LiteDB.LiteCollection`1.EnsureIndex(String field, String expression, Boolean unique)
  at LiteDB.LiteCollection`1.EnsureIndex[K](Expression`1 property, Boolean unique)

LiteDB 使用 FileStream ctor 打开数据文件,所以它可能是长路径的问题。但是,您可以使用 Stream 作为数据库的初始化程序,这样您就可以在任何平台上打开。