Skip to content

Commit

Permalink
fix: windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Oct 25, 2024
1 parent 85b4f19 commit 453dc0d
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions remotefs-fuse-cli/src/cli/smb.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use argh::FromArgs;
use remotefs_smb::{SmbCredentials, SmbFs, SmbOptions};
use remotefs_smb::{SmbCredentials, SmbFs};

#[derive(FromArgs, Debug)]
#[argh(subcommand, name = "smb")]
Expand Down Expand Up @@ -44,13 +44,21 @@ impl From<SmbArgs> for SmbFs {
credentials = credentials.workgroup(workgroup);
}

SmbFs::try_new(
credentials,
SmbOptions::default()
.one_share_per_server(true)
.case_sensitive(false),
)
.expect("Failed to create SMB client")
#[cfg(unix)]
{
SmbFs::try_new(
credentials,
remotefs_smb::SmbOptions::default()
.one_share_per_server(true)
.case_sensitive(false),
)
.expect("Failed to create SMB client")
}

#[cfg(windows)]
{
SmbFs::new(credentials)
}
}
}

Expand Down

0 comments on commit 453dc0d

Please sign in to comment.