···463 if [ -d "$fn" ]; then
464465 stripHash "$fn"
466- cp -prd --no-preserve=timestamps "$fn" $strippedName
00467468 else
469
···463 if [ -d "$fn" ]; then
464465 stripHash "$fn"
466+ # We can't preserve hardlinks because they may have been introduced by
467+ # store optimization, which might break things in the build
468+ cp -pr --reflink=auto --no-preserve=timestamps "$fn" $strippedName
469470 else
471