summaryrefslogtreecommitdiffstats
path: root/src/meta/windows_utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/meta/windows_utils.rs')
-rw-r--r--src/meta/windows_utils.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/meta/windows_utils.rs b/src/meta/windows_utils.rs
index a9db172..e647c26 100644
--- a/src/meta/windows_utils.rs
+++ b/src/meta/windows_utils.rs
@@ -2,7 +2,7 @@ use std::ffi::{OsStr, OsString};
use std::io;
use std::mem::MaybeUninit;
use std::os::windows::ffi::{OsStrExt, OsStringExt};
-use std::path::{Path, PathBuf};
+use std::path::Path;
use windows::Win32::Foundation::PSID;
use windows::Win32::Security::{self, Authorization::TRUSTEE_W, ACL};
@@ -343,18 +343,6 @@ pub fn is_path_system(path: &Path) -> bool {
)
}
-/// Expands the `~` in a path to the current user's home directory
-pub fn expand_home(path: PathBuf) -> PathBuf {
- if path.starts_with("~") {
- if let Some(home) = dirs::home_dir() {
- let mut expanded = home.to_path_buf();
- expanded.push(path.strip_prefix("~").unwrap());
- return expanded;
- }
- }
- path
-}
-
#[cfg(test)]
mod test {
use super::*;