mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
fix: use ; as delimiter on windows for _PR_LIB (github #37)
Co-authored-by: iff <iff@ik.me>
This commit is contained in:
parent
737440869c
commit
d76a244a1a
3 changed files with 22 additions and 5 deletions
|
|
@ -1,5 +1,7 @@
|
|||
use pay_respects_utils::evals::split_command;
|
||||
use pay_respects_utils::files::get_path_files;
|
||||
use pay_respects_utils::files::path_env_sep;
|
||||
|
||||
use std::process::{exit, Stdio};
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
|
@ -7,6 +9,9 @@ use std::sync::mpsc::channel;
|
|||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
#[cfg(windows)]
|
||||
use pay_respects_utils::files::path_convert;
|
||||
|
||||
pub const PRIVILEGE_LIST: [&str; 2] = ["sudo", "doas"];
|
||||
|
||||
#[derive(PartialEq)]
|
||||
|
|
@ -112,8 +117,12 @@ impl Data {
|
|||
}
|
||||
}
|
||||
|
||||
let path = lib_dir.split(':').collect::<Vec<&str>>();
|
||||
let path = lib_dir.split(path_env_sep()).collect::<Vec<&str>>();
|
||||
|
||||
for p in path {
|
||||
#[cfg(windows)]
|
||||
let p = path_convert(p);
|
||||
|
||||
let files = match std::fs::read_dir(p) {
|
||||
Ok(files) => files,
|
||||
Err(_) => continue,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue