mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
feat: Default to no owner for rsync (#2230)
This commit is contained in:
@@ -23,6 +23,8 @@ pub struct RsyncOptions {
|
||||
pub exclude: Vec<String>,
|
||||
#[serde(default = "const_true")]
|
||||
pub no_permissions: bool,
|
||||
#[serde(default = "const_true")]
|
||||
pub no_owner: bool,
|
||||
}
|
||||
impl Default for RsyncOptions {
|
||||
fn default() -> Self {
|
||||
@@ -32,6 +34,7 @@ impl Default for RsyncOptions {
|
||||
ignore_existing: false,
|
||||
exclude: Vec::new(),
|
||||
no_permissions: false,
|
||||
no_owner: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,6 +64,9 @@ impl Rsync {
|
||||
if options.no_permissions {
|
||||
cmd.arg("--no-perms");
|
||||
}
|
||||
if options.no_owner {
|
||||
cmd.arg("--no-owner");
|
||||
}
|
||||
for exclude in options.exclude {
|
||||
cmd.arg(format!("--exclude={}", exclude));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user