mirror of
https://github.com/philmmanjaro/alma.git
synced 2025-07-26 23:19:29 +02:00
Consume the mount stack on umount
This commit is contained in:
parent
d672cf5663
commit
db9fdb29c6
@ -54,7 +54,7 @@ impl<'a> MountStack<'a> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn umount(&mut self) -> Result<(), Error> {
|
fn _umount(&mut self) -> Result<(), Error> {
|
||||||
let mut result = Ok(());
|
let mut result = Ok(());
|
||||||
|
|
||||||
while let Some(target) = self.targets.pop() {
|
while let Some(target) = self.targets.pop() {
|
||||||
@ -67,10 +67,14 @@ impl<'a> MountStack<'a> {
|
|||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn umount(mut self) -> Result<(), Error> {
|
||||||
|
self._umount()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Drop for MountStack<'a> {
|
impl<'a> Drop for MountStack<'a> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.umount().ok();
|
self._umount().ok();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user