Delete note on save when empty print message.
This commit is contained in:
@@ -1044,6 +1044,7 @@ async def set_notes(request):
|
|||||||
if text.isspace() or text == "":
|
if text.isspace() or text == "":
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
print("Deleted file: " + filename)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
with open(filename, "w", encoding="utf-8") as f:
|
with open(filename, "w", encoding="utf-8") as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user