summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devices/file/bedrock_file_path.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/file/bedrock_file_path.rs b/src/devices/file/bedrock_file_path.rs
index e083853..1c702de 100644
--- a/src/devices/file/bedrock_file_path.rs
+++ b/src/devices/file/bedrock_file_path.rs
@@ -65,15 +65,15 @@ impl BedrockFilePath {
/// Get a path which represents the parent of this path.
pub fn parent(&self) -> Option<Self> {
#[cfg(target_family = "unix")] {
- Self::from_path(self.relative.parent()?, &self.base)
+ Self::from_path(self.as_path().parent()?, &self.base)
}
#[cfg(target_family = "windows")] {
if self.base.components().count() != 0 {
// Sandboxed path, cannot ascend to a virtual root directory.
- Self::from_path(self.relative.parent()?, &self.base)
+ Self::from_path(self.as_path().parent()?, &self.base)
} else {
// Unsandboxed path, we can ascend to a virtual root directory.
- match self.relative.parent() {
+ match self.as_path().parent() {
// Ascend to concrete parent directory.
Some(parent) => Self::from_path(parent, &self.base),
// Ascend into a virtual root directory.