Skip to content

Commit

Permalink
fix: set 'ipfs' path at root of VFS
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Aug 16, 2024
1 parent e99d548 commit e569bbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 0 additions & 7 deletions hermes/bin/src/vfs/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ impl VfsBootstrapper {
root.create_dir(Vfs::USR_DIR.into())?;
root.create_dir(Vfs::USR_LIB_DIR.into())?;
root.create_dir(Vfs::LIB_DIR.into())?;
root.create_dir(Vfs::VAR_DIR.into())?;
root.create_dir(Vfs::IPFS_DIR.into())?;
Ok(())
}
Expand All @@ -144,7 +143,6 @@ impl VfsBootstrapper {
permissions.add_permission(Vfs::USR_DIR, PermissionLevel::Read);
permissions.add_permission(Vfs::USR_LIB_DIR, PermissionLevel::Read);
permissions.add_permission(Vfs::LIB_DIR, PermissionLevel::Read);
permissions.add_permission(Vfs::VAR_DIR, PermissionLevel::Read);
permissions.add_permission(Vfs::IPFS_DIR, PermissionLevel::Read);
}

Expand Down Expand Up @@ -244,10 +242,6 @@ mod tests {
vfs.permissions.get_permission(Vfs::LIB_DIR),
PermissionLevel::Read
);
assert_eq!(
vfs.permissions.get_permission(Vfs::VAR_DIR),
PermissionLevel::Read
);
assert_eq!(
vfs.permissions.get_permission(Vfs::IPFS_DIR),
PermissionLevel::Read
Expand All @@ -260,7 +254,6 @@ mod tests {
assert!(vfs.root.get_dir(&Vfs::USR_DIR.into()).is_ok());
assert!(vfs.root.get_dir(&Vfs::USR_LIB_DIR.into()).is_ok());
assert!(vfs.root.get_dir(&Vfs::LIB_DIR.into()).is_ok());
assert!(vfs.root.get_dir(&Vfs::VAR_DIR.into()).is_ok());
assert!(vfs.root.get_dir(&Vfs::IPFS_DIR.into()).is_ok());
}

Expand Down
6 changes: 2 additions & 4 deletions hermes/bin/src/vfs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ impl Vfs {
pub(crate) const ETC_DIR: &'static str = "etc";
/// Virtual file system file extension.
pub(crate) const FILE_EXTENSION: &'static str = "hfs";
/// Virtual file system `var/ipfs` directory name.
pub(crate) const IPFS_DIR: &'static str = "var/ipfs";
/// Virtual file system `ipfs` directory name.
pub(crate) const IPFS_DIR: &'static str = "ipfs";
/// Virtual file system `lib` directory name.
pub(crate) const LIB_DIR: &'static str = "lib";
/// Virtual file system `srv` directory name.
Expand All @@ -38,8 +38,6 @@ impl Vfs {
pub(crate) const USR_DIR: &'static str = "usr";
/// Virtual file system `usr/lib` directory name.
pub(crate) const USR_LIB_DIR: &'static str = "usr/lib";
/// Virtual file system `var` directory name.
pub(crate) const VAR_DIR: &'static str = "var";
}

impl Vfs {
Expand Down

0 comments on commit e569bbb

Please sign in to comment.