From 117f760d7cb389ef9bed5a206cf6a510a1225a1b Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Tue, 9 Nov 2021 01:12:02 +0100 Subject: Rename --fix-permissions to --chown On second thought, we're just calling chown, so let's call it that. --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 91d1c9c..87f8847 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,7 +28,7 @@ fn main() -> Result<()> { .arg( Arg::with_name("world") .long("world") - .short("c") + .short("w") .required(false) .help("Select the world that we should operate on") .takes_value(true), @@ -67,9 +67,9 @@ fn main() -> Result<()> { .required(false), ) .arg( - Arg::with_name("fix-permissions") - .short("p") - .long("fix-permissions") + Arg::with_name("chown") + .short("o") + .long("chown") .help("Change the owner of the installed mod to match target-dir's") .required(false), ), @@ -214,7 +214,7 @@ fn install_mods( ) -> Result<()> { let target_dir = Path::new(matches.value_of("target").unwrap()); let dry_run = matches.is_present("dry-run"); - let fix_permissions = matches.is_present("fix-permissions"); + let chown_after = matches.is_present("chown"); let content_db = ContentDb::new(); let downloader = Downloader::new()?; @@ -329,7 +329,7 @@ fn install_mods( sys::stat, unistd::{Gid, Uid}, }; - if fix_permissions { + if chown_after { let perms = stat::stat(target_dir)?; let (uid, gid) = (Uid::from_raw(perms.st_uid), Gid::from_raw(perms.st_gid)); util::chown_recursive(installed.path(), Some(uid), Some(gid))?; -- cgit v1.2.3