Skip to content

Commit

Permalink
Don't use cp --reflink=auto under BSDs. Issue graysky2#344
Browse files Browse the repository at this point in the history
  • Loading branch information
morgant committed Jan 1, 2023
1 parent b8800dc commit c26c04d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/profile-sync-daemon.in
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ ungraceful_state_check() {
# at all which can be treated the same way

if [[ $CRRE -eq 1 ]]; then
cp -a --reflink=auto "$BACKUP" "$BACKUP-crashrecovery-$NOW"
if [[ "$(uname -s)" =~ BSD ]]; then
cp -a "$BACKUP" "$BACKUP-crashrecovery-$NOW"
else
cp -a --reflink=auto "$BACKUP" "$BACKUP-crashrecovery-$NOW"
fi
rm "${DIR%/}"
mv --no-target-directory "$BACKUP" "$DIR"
fi
Expand Down

0 comments on commit c26c04d

Please sign in to comment.