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')