Why dont this work? It print a, iv checked the path and its pointing to the right place.
def delete_file():
try:
file2remove = pathtofiles+clicked
if os.path.exists(file2remove):
os.remove(file2remove)
idx = listbox.get(0, tk.END).index(clicked)
listbox.delete(idx)
else:
print("The file does not exist")
except Exception as e:
from main import log_error
log_error(e, "notepad_delete_file")
Also change permission with
os.chmod(file2remove, "0777")
It works like it has deleted it but it doesnt, close the app, flush and it doesnt.
Also this was working yesterday and i havent done any change to the code since then...
Any idea?