mountpoint: make it compile on Windows
This commit is contained in:
parent
5c0f7cf9d9
commit
1c467f00a2
@ -7,6 +7,7 @@ use clap::Arg;
|
|||||||
use clap::{crate_version, Command};
|
use clap::{crate_version, Command};
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
#[cfg(not(windows))]
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
use std::process;
|
use std::process;
|
||||||
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
use uucore::{error::UResult, format_usage, help_about, help_usage};
|
||||||
@ -33,6 +34,7 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(windows))]
|
||||||
fn is_mountpoint(path: &str) -> bool {
|
fn is_mountpoint(path: &str) -> bool {
|
||||||
let metadata = match fs::metadata(path) {
|
let metadata = match fs::metadata(path) {
|
||||||
Ok(metadata) => metadata,
|
Ok(metadata) => metadata,
|
||||||
@ -50,6 +52,12 @@ fn is_mountpoint(path: &str) -> bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: implement for windows
|
||||||
|
#[cfg(windows)]
|
||||||
|
fn is_mountpoint(path: &str) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
pub fn uu_app() -> Command {
|
pub fn uu_app() -> Command {
|
||||||
Command::new(uucore::util_name())
|
Command::new(uucore::util_name())
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user