mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-22 12:41:14 +03:00
refactor: replace &PathBuf with &Path to enhance generality (#10332)
This commit is contained in:
@@ -123,7 +123,7 @@ pub fn get_home_as_string() -> String {
|
||||
}
|
||||
|
||||
fn read_dir_recursive(
|
||||
path: &PathBuf,
|
||||
path: &Path,
|
||||
prefix: &Path,
|
||||
include_hidden: bool,
|
||||
) -> ResultType<Vec<FileEntry>> {
|
||||
@@ -186,7 +186,7 @@ pub fn get_recursive_files(path: &str, include_hidden: bool) -> ResultType<Vec<F
|
||||
}
|
||||
|
||||
fn read_empty_dirs_recursive(
|
||||
path: &PathBuf,
|
||||
path: &Path,
|
||||
prefix: &Path,
|
||||
include_hidden: bool,
|
||||
) -> ResultType<Vec<FileDirectory>> {
|
||||
@@ -854,7 +854,7 @@ pub async fn handle_read_jobs(
|
||||
Ok(job_log)
|
||||
}
|
||||
|
||||
pub fn remove_all_empty_dir(path: &PathBuf) -> ResultType<()> {
|
||||
pub fn remove_all_empty_dir(path: &Path) -> ResultType<()> {
|
||||
let fd = read_dir(path, true)?;
|
||||
for entry in fd.entries.iter() {
|
||||
match entry.entry_type.enum_value() {
|
||||
|
||||
Reference in New Issue
Block a user