fix icacls for non-english versions of windows

This commit is contained in:
Carbonari 2023-03-17 12:37:11 +01:00
parent 4c213a238a
commit e9d2a72d00

View File

@ -1817,7 +1817,7 @@ pub fn set_path_permission(dir: &PathBuf, permission: &str) -> ResultType<()> {
std::process::Command::new("icacls") std::process::Command::new("icacls")
.arg(dir.as_os_str()) .arg(dir.as_os_str())
.arg("/grant") .arg("/grant")
.arg(format!("Everyone:(OI)(CI){}", permission)) .arg(format!("*S-1-1-0:(OI)(CI){}", permission))
.arg("/T") .arg("/T")
.spawn()?; .spawn()?;
Ok(()) Ok(())