Open jsinsel-kahua opened 4 years ago
@jsinsel There's an inconsistency in FileStorage.Find(string)
between v4 and v5. I'll work on a fix, but in the meantime, using fs.Find(x => x.Id.StartsWith(path))
is a simple workaround.
That workaround keeps me moving, thanks!
Isn't this workaround bad performance wise? wouldn't that iterate over the entire file storage?
Version 5.08
Describe the bug I recently upgraded to 5.0.8 from version 4.1.4. Using the FileStorage.Find method crashes with guids in the path. I was able to do this in 4.1.4. I didn't notice anything in the documentation on v5 FileStorage that would prevent this.
Code to Reproduce var connectionString = new ConnectionString { Filename = "test.db", Connection = ConnectionType.Direct }; var db = new LiteDatabase(connectionString); var guid = Guid.NewGuid(); var path = $"$/TestPath/{guid}/"; var files = db.FileStorage.Find(path).ToList();
I've also tried with no trailing slash and also formatting the guid with the N format (no dashes) with no success.
Expected behavior Be able to use guids in file "directory" paths.