fix: cli compilation error when using cli feature
This commit is contained in:
parent
c0aa0d743a
commit
e468ae5797
6 changed files with 36 additions and 28 deletions
|
|
@ -9,7 +9,7 @@ pub trait FileManager: Interface {
|
|||
fs::get_home_as_string()
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios", feature = "cli")))]
|
||||
fn read_dir(&self,path: String, include_hidden: bool) -> sciter::Value {
|
||||
match fs::read_dir(&fs::get_path(&path), include_hidden) {
|
||||
Err(_) => sciter::Value::null(),
|
||||
|
|
@ -22,9 +22,9 @@ pub trait FileManager: Interface {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "android", target_os = "ios"))]
|
||||
#[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]
|
||||
fn read_dir(&self,path: &str, include_hidden: bool) -> String {
|
||||
use crate::mobile::make_fd_to_json;
|
||||
use crate::common::make_fd_to_json;
|
||||
match fs::read_dir(&fs::get_path(path), include_hidden){
|
||||
Ok(fd) => make_fd_to_json(fd),
|
||||
Err(_)=>"".into()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue