nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] files: improve the backup procedure to ensure no data is


From: Benno Schulenberg
Subject: Re: [PATCH v2] files: improve the backup procedure to ensure no data is lost
Date: Thu, 9 Jul 2020 17:07:29 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Op 09-07-2020 om 12:22 schreef Michalis Kokologiannakis:
> As for follow-ups, I was considering:
> 
>    1) Adding/modifying some comments in the code
>    2) A switch to turn the failsafes off
>    3) Perhaps taking a failsafe backup only once (when the file    is first
> modified), to avoid the backup's overhead if the file    is saved repeatedly.

All three sound good.  But better start with: 0) Move the backup code
into a separate function.  In that patch, please leave the relevant
block of code itself unchanged as far as possible, only make the
needed changes from 'goto' to 'return'.  Then 1), then 3).

Benno

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]