Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // By convention, anything in the bin/ directory of the package is a
- // binary. This is done for some old dists missing the X bits in those dirs
- let is_bin = if let Some(p) = full_path.parent() {
- // An optimisation for efficiency would be to detect this in the
- // components iteration rather than re-calculating path parent() here.
- p.ends_with("bin")
- } else {
- false
- };
- // Directories and any files marked X and anything shipped in bin keep the X bit.
- let needs_x = is_dir || tar_mode & 0o100 == 0o100 || is_bin;
- let mode = if needs_x { 0o755 } else { 0o644 };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement