fix: Check if .git dir exists before trying to read it

This commit is contained in:
2024-11-21 16:30:44 +11:00
parent 0be6b8b435
commit 3e78732333

View File

@@ -1040,6 +1040,9 @@ def settings():
if success == None:
success = ""
if not os.path.exists(".git"):
return render_template("settings.html", account=account,sync=account_module.getNodeSync(),
error=error,success=success,version="Error")
info = gitinfo.get_git_info()
branch = info['refs']
if branch != "main":