diff --git a/studio/backup_blends.py b/studio/backup_blends.py index bbe3c20..f1ad53b 100644 --- a/studio/backup_blends.py +++ b/studio/backup_blends.py @@ -9,6 +9,7 @@ # License could be found in full text on gnu.org/licenses import os +import json import sys import time import hashlib @@ -68,6 +69,18 @@ def main(): # Main loop ( 30 seconds intervals ) while True: + + try: + with open(project+"/backup_data.json") as f: + backup_data = json.load(f) + except: + backup_data = {} + + backup_data["lastcheck"] = int(time.time()) + + with open(project+"/backup_data.json", "w") as f: + json.dump(backup_data, f, indent=4) + print("Counting another 30 seconds...") time.sleep(30) print("Checking for changed files...")