mirror of
https://github.com/Drop-OSS/droplet.git
synced 2025-11-17 10:11:17 +10:00
@ -1,5 +1,9 @@
|
||||
use std::{
|
||||
collections::HashMap, fs::File, io::{BufRead, BufReader}, path::Path, thread
|
||||
collections::HashMap,
|
||||
fs::File,
|
||||
io::{BufRead, BufReader},
|
||||
path::Path,
|
||||
thread,
|
||||
};
|
||||
|
||||
#[cfg(unix)]
|
||||
@ -73,11 +77,15 @@ pub fn generate_manifest(
|
||||
let relative = file_path.strip_prefix(base_dir).unwrap();
|
||||
let permission_object = file.try_clone().unwrap().metadata().unwrap().permissions();
|
||||
let permissions = {
|
||||
let mut perm = 0;
|
||||
#[cfg(unix)]
|
||||
let perm: u32;
|
||||
#[cfg(target_family = "unix")]
|
||||
{
|
||||
perm = permission_object.mode();
|
||||
}
|
||||
#[cfg(not(target_family = "unix"))]
|
||||
{
|
||||
perm = 0
|
||||
}
|
||||
perm
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user