File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1456,6 +1456,7 @@ winetricks_selfupdate()
14561456 w_try cp "$0" "${_W_rollback_file}"
14571457 w_try chmod -x "${_W_rollback_file}"
14581458
1459+ # Uses mv to avoid race condition in overwriting running shell script. Do not replace with cp or other non-atomic writes!
14591460 w_try mv "${_W_update_file}" "$0"
14601461 w_try chmod +x "$0"
14611462
@@ -1471,6 +1472,7 @@ winetricks_selfupdate_rollback()
14711472 _W_rollback_file="${0}.bak"
14721473
14731474 if test -f "${_W_rollback_file}"; then
1475+ # Uses mv to avoid race condition in overwriting running shell script. Do not replace with cp or other non-atomic writes!
14741476 w_try mv "${_W_rollback_file}" "$0"
14751477 w_try chmod +x "$0"
14761478 w_warn "Rollback finished! The current version is $($0 -V)."
You can’t perform that action at this time.
0 commit comments