From 76d98037dfaef5112c39713e8d3c89b2387a9b60 Mon Sep 17 00:00:00 2001 From: rlbr Date: Mon, 26 Nov 2018 22:13:32 -0600 Subject: [PATCH] fixed a few bugs --- backup.py | 0 restore.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 backup.py mode change 100644 => 100755 restore.py diff --git a/backup.py b/backup.py old mode 100644 new mode 100755 diff --git a/restore.py b/restore.py old mode 100644 new mode 100755 index 6aa36e6..09fae39 --- a/restore.py +++ b/restore.py @@ -26,12 +26,12 @@ def restore(database,source,destination): for path,imohash,realhash in hashes: ppath = os.path.join(source,path) qpath=lookup(cur,imohash,realhash) - qpath=os.path.join(temp,qpth) + qpath=os.path.join(temp,qpath) parent = os.path.dirname(qpath) if not os.path.exists(parent): os.makedirs(parent) shutil.move(ppath,qpath) - shutil.move(temp,dest) + os.rename(temp,destination) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('database')