File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// FIXME: actually refactor errors instead
22#![ allow( clippy:: result_large_err) ]
33use std:: { fmt, path:: PathBuf } ;
4- #[ cfg( not( windows) ) ]
5- use std:: {
6- fs:: { set_permissions, Permissions } ,
7- os:: unix:: fs:: PermissionsExt ,
8- } ;
4+ // #[cfg(not(windows))]
5+ // use std::{
6+ // fs::{set_permissions, Permissions},
7+ // os::unix::fs::PermissionsExt,
8+ // };
99
1010use chrono:: NaiveDateTime ;
1111use semver:: Version ;
@@ -86,13 +86,14 @@ pub fn app_data_dir() -> Option<PathBuf> {
8686/// - 700 for directories
8787/// - 600 for files
8888pub fn set_perms ( path : & PathBuf ) {
89- #[ cfg( not( windows) ) ]
90- {
91- let perms = if path. is_dir ( ) { 0o700 } else { 0o600 } ;
92- if let Err ( err) = set_permissions ( path, Permissions :: from_mode ( perms) ) {
93- warn ! ( "Failed to set permissions on path {path:?}: {err}" ) ;
94- }
95- }
89+
90+ // #[cfg(not(windows))]
91+ // {
92+ // let perms = if path.is_dir() { 0o700 } else { 0o600 };
93+ // if let Ok(metadata) = path.metadata() {
94+ // metadata.permissions().set_mode(perms)
95+ // };
96+ // }
9697}
9798
9899/// Location type used in commands to check if we using tunnel or location
You can’t perform that action at this time.
0 commit comments