Change index/store filename - dedup - deduplicating backup program HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 7728f1e69f44f5ad45e61946f3747234c7d47094 DIR parent fbfe225ce55f4ffabc9368f373171aac1e198935 HTML Author: sin <sin@2f30.org> Date: Tue, 20 Mar 2018 17:57:00 +0000 Change index/store filename Diffstat: M dedup.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- DIR diff --git a/dedup.c b/dedup.c @@ -9,6 +9,8 @@ #include <openssl/sha.h> #include "arg.h" +#define INDEXF ".index" +#define STOREF ".store" #define BLKSIZ 32768 struct enthdr { @@ -248,13 +250,13 @@ init(void) { struct stat sb; - ifd = open("index", O_RDWR | O_CREAT, 0600); + ifd = open(INDEXF, O_RDWR | O_CREAT, 0600); if (ifd == -1) - err(1, "open index"); + err(1, "open %s", INDEXF); - sfd = open("store", O_RDWR | O_CREAT, 0600); + sfd = open(STOREF, O_RDWR | O_CREAT, 0600); if (sfd == -1) - err(1, "open store"); + err(1, "open %s", STOREF); if (fstat(ifd, &sb) == -1) err(1, "stat index");