dedup

deduplicating backup program
git clone git://git.2f30.org/dedup
Log | Files | Refs | README | LICENSE

commit d52d93206950864179a0da2c44b5dd0528506213
parent 947a779321210f9080b129607d83c444837a2083
Author: sin <sin@2f30.org>
Date:   Sat,  2 Mar 2019 13:03:26 +0000

Create cache file if not present

Diffstat:
Mdedup.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dedup.c b/dedup.c @@ -544,7 +544,11 @@ init(int iflag) if (sfd < 0) err(1, "open %s", STOREF); - cfd = open(CACHEF, flags, 0600); + /* + * The cache file does not have to exist + * and will be created again if deleted. + */ + cfd = open(CACHEF, O_RDWR | O_CREAT, 0600); if (cfd < 0) err(1, "open %s", CACHEF);