Skip to content

Commit 2c425a1

Browse files
committed
set volume dirty always also for raw volumes
1 parent 70a5fdb commit 2c425a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/volume_mgr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ where
116116
open_mode: VolumeOpenMode,
117117
) -> Result<Volume<D, T, MAX_DIRS, MAX_FILES, MAX_VOLUMES>, Error<D::Error>> {
118118
let v = self.open_raw_volume(volume_idx, open_mode)?;
119-
if open_mode != VolumeOpenMode::ReadOnly {
120-
self.set_volume_status_dirty(v, true)?;
121-
}
122119
Ok(v.to_volume(self))
123120
}
124121

@@ -215,6 +212,9 @@ where
215212
};
216213
// We already checked for space
217214
self.open_volumes.push(info).unwrap();
215+
if open_mode != VolumeOpenMode::ReadOnly {
216+
self.set_volume_status_dirty(id, true)?;
217+
}
218218
Ok(id)
219219
}
220220
_ => Err(Error::FormatError("Partition type not supported")),

0 commit comments

Comments
 (0)