fix: wrong place to place the lock

This commit is contained in:
Terry Geng
2020-03-08 15:16:37 +08:00
parent f931ae7d28
commit d5e877b4da
2 changed files with 13 additions and 9 deletions

View File

@ -133,12 +133,12 @@ def recur_dir(dirobj):
@web.route("/", methods=['GET'])
@requires_auth
def index():
tags_color_lookup = build_tags_color_lookup()
path_tags_lookup = build_path_tags_lookup()
while var.library.dir_lock.locked():
time.sleep(0.1)
tags_color_lookup = build_tags_color_lookup()
path_tags_lookup = build_path_tags_lookup()
return render_template('index.html',
all_files=var.library.files,
tags_lookup=path_tags_lookup,