Skip to content

Commit f7fbd08

Browse files
committed
fix: tests
1 parent 1f48c14 commit f7fbd08

File tree

4 files changed

+74
-94
lines changed

4 files changed

+74
-94
lines changed

rar-common/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ pub struct SettingsFile {
127127
#[derive(Serialize, Deserialize, Debug, Clone, Builder, PartialEq, Eq, Default)]
128128
pub struct FullSettingsFile {
129129
pub storage: Settings,
130-
#[serde(skip)]
130+
#[serde(default, flatten)]
131131
pub config: Option<Rc<RefCell<SConfig>>>,
132132
}
133133

@@ -368,7 +368,11 @@ where
368368
.path
369369
.as_ref()
370370
.unwrap_or(&into);
371-
binding.config = Some(retrieve_sconfig(&binding.storage.method, data_path)?);
371+
if data_path != path.as_ref() {
372+
binding.config = Some(retrieve_sconfig(&binding.storage.method, data_path)?);
373+
} else {
374+
make_weak_config(binding.config.as_ref().unwrap());
375+
}
372376
}
373377

374378
Ok(settingsfile.clone())

0 commit comments

Comments
 (0)