dedup

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

commit fcc899cbc1d3c835f1b28b9702e6965505ac8d66
parent 95c553d5f0552ea0b2d2ec7937bf31336629c0d3
Author: sin <sin@2f30.org>
Date:   Thu, 16 May 2019 14:09:05 +0300

Load key before repo state

It might be needed in the repo state handling.

Diffstat:
Mdup-check.c | 2+-
Mdup-gc.c | 2+-
Mdup-pack.c | 2+-
Mdup-rm.c | 2+-
Mdup-unpack.c | 2+-
5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dup-check.c b/dup-check.c @@ -127,8 +127,8 @@ main(int argc, char *argv[]) if ((lfd = lockrepo(repo)) < 0) errx(1, "failed to lock repository"); - loadstate(repo); loadkey(keyfile); + loadstate(repo); if (sopen(spath, S_READ, 0600, &sctx) < 0) printerr("sopen: %s", spath); diff --git a/dup-gc.c b/dup-gc.c @@ -101,8 +101,8 @@ main(int argc, char *argv[]) if ((lfd = lockrepo(repo)) < 0) errx(1, "failed to lock repository"); - loadstate(repo); loadkey(keyfile); + loadstate(repo); if (bopen(path, B_RDWR, 0600, &bctx) < 0) printerr("bopen: %s", path); diff --git a/dup-pack.c b/dup-pack.c @@ -128,8 +128,8 @@ main(int argc, char *argv[]) if ((lfd = lockrepo(repo)) < 0) errx(1, "failed to lock repository"); - loadstate(repo); loadkey(keyfile); + loadstate(repo); if (screat(spath, 0600, &sctx) < 0) printerr("screat: %s", spath); diff --git a/dup-rm.c b/dup-rm.c @@ -116,8 +116,8 @@ main(int argc, char *argv[]) if ((lfd = lockrepo(repo)) < 0) errx(1, "failed to lock repository"); - loadstate(repo); loadkey(keyfile); + loadstate(repo); if (sopen(spath, S_READ, 0600, &sctx) < 0) printerr("sopen: %s", spath); diff --git a/dup-unpack.c b/dup-unpack.c @@ -125,8 +125,8 @@ main(int argc, char *argv[]) if ((lfd = lockrepo(repo)) < 0) errx(1, "failed to lock repository"); - loadstate(repo); loadkey(keyfile); + loadstate(repo); if (sopen(spath, S_READ, 0600, &sctx) < 0) printerr("sopen: %s", spath);