mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-01-06 13:18:00 +03:00
sync config: forbid setting resync_corrupt for push jobs
they don't support it (yet), so don't allow setting it in the backend either. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
19818d1449
commit
8e057c3874
@ -229,6 +229,10 @@ pub fn create_sync_job(
|
||||
bail!("source and target datastore can't be the same");
|
||||
}
|
||||
|
||||
if sync_direction == SyncDirection::Push && config.resync_corrupt.is_some() {
|
||||
bail!("push jobs do not support resync-corrupt option");
|
||||
}
|
||||
|
||||
if let Some(max_depth) = config.max_depth {
|
||||
if let Some(ref ns) = config.ns {
|
||||
ns.check_max_depth(max_depth)?;
|
||||
@ -389,6 +393,10 @@ pub fn update_sync_job(
|
||||
http_bail!(NOT_FOUND, "job '{id}' does not exist.")
|
||||
};
|
||||
|
||||
if sync_direction == SyncDirection::Push && update.resync_corrupt.is_some() {
|
||||
bail!("push jobs do not support resync-corrupt option");
|
||||
}
|
||||
|
||||
if let Some(delete) = delete {
|
||||
for delete_prop in delete {
|
||||
match delete_prop {
|
||||
|
Loading…
Reference in New Issue
Block a user