Dont attempt to initialize session persistence folder if its turned off

This commit is contained in:
Igor Katson 2024-05-17 18:40:13 +01:00
parent 108ad74464
commit b687a1882c
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -516,6 +516,7 @@ impl Session {
let peer_opts = opts.peer_opts.unwrap_or_default();
let persistence_filename = match opts.persistence_filename {
Some(filename) => filename,
None if !opts.persistence => PathBuf::new(),
None => Self::default_persistence_filename()?,
};
let spawner = BlockingSpawner::default();