mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +03:00
Fix ffi interoperability issue
Clients expect empty "dbfile" argument to be treated as NULL value. This change fulfills their expectations. Closes: #530
This commit is contained in:
committed by
holger krekel
parent
95d8665dbe
commit
e0e82e1877
@@ -475,6 +475,15 @@ mod tests {
|
||||
assert!(dbfile2.is_file());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_with_empty_blobdir() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
let dbfile = tmp.path().join("db.sqlite");
|
||||
let blobdir = PathBuf::new();
|
||||
let res = Context::with_blobdir(Box::new(|_, _| 0), "FakeOS".into(), dbfile, blobdir);
|
||||
assert!(res.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_with_blobdir_not_exists() {
|
||||
let tmp = tempfile::tempdir().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user