diff --git a/melib/src/utils/shellexpand.rs b/melib/src/utils/shellexpand.rs index 55193599..4edd4ed8 100644 --- a/melib/src/utils/shellexpand.rs +++ b/melib/src/utils/shellexpand.rs @@ -348,7 +348,7 @@ pub mod impls { Self::from_bytes( self.as_bytes() .strip_prefix(prefix.as_bytes()) - .and_then(|s| s.strip_prefix(b"/")) + .and_then(|s| s.strip_prefix(b"/").or(Some(s))) .unwrap_or_else(|| { self.as_bytes() .strip_prefix(b"/")