Subject: bug#29266: gzip-1.8.41 test results: help-version and hard links

From: Paul Eggert <[email-masked]>
Date: Wed, 15 Nov 2017 23:43:04 -0800

On 11/15/2017 09:32 PM, Jim Meyering wrote:
> +  ln -f "$file" "$file~" 2>/dev/null || cp -f "$file" "$file~" || {

This will be problematic if the destination already exists, as the 
resulting permissions etc. may not be what the user intend. How about if 
we fall back on "mv -f" instead? Althoug this has the disadvantage of 
having a small window where "$file" does not exist, I think that's 
preferable to the disadvantage of using "cp".