-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Always NullReferenceException in FileStorage.Find() #1469
Comments
FileStorage.FindAll() is also affected... |
Hi @duduric, FileStorage works a bit different in v5. There is no more restriction about
or
or
|
@deje07, yes, it's a bug. I'm fixing this. For now you can use some like |
Thanks, we have been able to fix this part of the code |
Hi @mbdavid , could you change FileStorage section on https://www.litedb.org/docs/filestorage/ ? // Find all files references in a "directory" |
Version
Using version 5.0.2
Describe the bug
Find always returns a System.NullReferenceException in any path or database we try. The same code works perfectly and was in production on Version 4.1.4.
We know there are file because Exists() and Download() is working correctly with the same paths
Code to Reproduce
Expected behavior
Should return a list with all the file ids
Screenshots/Stacktrace
Result StackTrace:
at LiteDB.BsonExpressionParser.TryParseFunction(Tokenizer tokenizer, ExpressionContext context, Boolean isRoot)
at LiteDB.BsonExpressionParser.ParseSingleExpression(Tokenizer tokenizer, ExpressionContext context, Boolean isRoot)
at LiteDB.BsonExpressionParser.ParseFullExpression(Tokenizer tokenizer, ExpressionContext context, Boolean isRoot)
at LiteDB.BsonExpression.Parse(Tokenizer tokenizer, BsonExpressionParserMode mode, Boolean isRoot)
at LiteDB.BsonExpression.Create(String expression)
at LiteDB.BsonExpression.Create(String expression, BsonValue[] args)
at LiteDB.LiteStorage`1.Find(String predicate, BsonValue[] args)
at ....
Result Message:
Method threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.
The text was updated successfully, but these errors were encountered: