mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-20 10:15:56 +00:00
Documents no longer duplicated when indexing twice in a row. Thumbnails and documents erased when directory is removed
This commit is contained in:
4
run.py
4
run.py
@@ -296,6 +296,10 @@ def directory_update_opt(dir_id):
|
||||
@app.route("/directory/<int:dir_id>/del")
|
||||
def directory_del(dir_id):
|
||||
|
||||
search.delete_directory(dir_id)
|
||||
if os.path.exists("static/thumbnails/" + str(dir_id)):
|
||||
shutil.rmtree("static/thumbnails/" + str(dir_id))
|
||||
|
||||
storage.remove_directory(dir_id)
|
||||
flash("<strong>Deleted directory</strong>", "success")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user