Skip to content

Commit

Permalink
Quote shared folder paths only (openmediavault#1802)
Browse files Browse the repository at this point in the history
... otherwise rsync arguments like `user@host:/dir1 :/dir2 :/dir3` will get quoted as well.

Fixes: openmediavault#1801

Signed-off-by: Volker Theile <[email protected]>
  • Loading branch information
votdev authored Jul 30, 2024
1 parent 077eb16 commit b301821
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,17 @@ rsync --verbose --log-file="{{ logfile }}"
{%- if job.optionxattrs | to_bool %}{{ separator }}--xattrs{%- endif %}
{%- if job.optionpartial | to_bool %}{{ separator }}--partial{%- endif %}
{%- if job.extraoptions | length > 0 %}{{ separator }}{{ job.extraoptions }}{%- endif -%}
{{ separator }}"{{ srcuri }}" "{{ desturi }}" & wait $!
{%- if job.type == 'local' -%}
{%- set srcuri = srcuri | quote -%}
{%- set desturi = desturi | quote -%}
{%- elif job.type == 'remote' -%}
{%- if job.mode == 'push' -%}
{%- set srcuri = srcuri | quote -%}
{%- elif job.mode == 'pull' -%}
{%- set desturi = desturi | quote -%}
{%- endif -%}
{%- endif -%}
{{ separator }}{{ srcuri }}{{ separator }}{{ desturi }} & wait $!
{%- if not job.optionquiet | to_bool %}
if [ $? -eq 0 ]; then
omv_log "The synchronisation has completed successfully."
Expand Down

0 comments on commit b301821

Please sign in to comment.