Fix compilation on other target than linux
This commit is contained in:
parent
37d1955da7
commit
4a7d489ff4
|
@ -1,4 +1,5 @@
|
|||
/target
|
||||
*.py
|
||||
enc
|
||||
mount
|
||||
mount
|
||||
.cargo
|
|
@ -7,8 +7,10 @@ license = "MIT OR Apache-2.0"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
fuser = { version = "0.11", default-features = false }
|
||||
log = "0.4"
|
||||
rustcryptfs-lib = { path = "../rustcryptfs-lib" }
|
||||
thiserror = "1.0"
|
||||
libc = "0.2"
|
||||
libc = "0.2"
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
fuser = { version = "0.11", default-features = false }
|
|
@ -1,6 +1,10 @@
|
|||
#[cfg(target_os = "linux")]
|
||||
mod encrypted_filesystem;
|
||||
#[cfg(target_os = "linux")]
|
||||
mod inode_cache;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
pub mod error;
|
||||
|
||||
pub use encrypted_filesystem::EncryptedFs;
|
||||
#[cfg(target_os = "linux")]
|
||||
pub use encrypted_filesystem::EncryptedFs;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
use std::path::Path;
|
||||
|
||||
use rustcryptfs_fuse::EncryptedFs;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
pub fn mount<P>(path: P, mount_point: P, password: &str) -> rustcryptfs_fuse::error::Result<()>
|
||||
where
|
||||
P: AsRef<Path>,
|
||||
{
|
||||
use rustcryptfs_fuse::EncryptedFs;
|
||||
|
||||
let fs = EncryptedFs::new(path, password)?;
|
||||
|
||||
fs.mount(mount_point)?;
|
||||
|
|
Loading…
Reference in New Issue