diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index f03cdcf..462b4b6 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -174,13 +174,19 @@ void save_changes(int overwrite) if (!filename[0] || !overwrite) { rb->strcpy(filename,"/"); - rb->kbd_input(filename,MAX_PATH); + if (rb->kbd_input(filename,MAX_PATH) < 0) + { + filename[0] = '\0'; + rb->splash(HZ*2, "Changes NOT saved"); + return; + } } fd = rb->open(filename,O_WRONLY|O_CREAT|O_TRUNC); if (fd < 0) { - rb->splash(HZ*2, "Changes NOT saved"); + filename[0] = '\0'; + rb->splash(HZ*2, "Can not save !!"); return; }