Skip to content

Commit

Permalink
filedialog: do not allow empty filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Nov 13, 2011
1 parent d94aa14 commit 252720c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/filedialog.c
Expand Up @@ -231,7 +231,11 @@ static void file_selcommit_callback(mtk_event *e, void *arg)
static void dlg_ok_callback(mtk_event *e, void *arg)
{
struct filedialog *dlg = arg;

char file[384];

mtk_req(dlg->appid, file, sizeof(file), "fd_filename.text");
if(strcmp(file, "") == 0)
return;
close_filedialog(dlg);
if(dlg->ok_callback)
dlg->ok_callback(dlg->ok_callback_arg);
Expand Down

0 comments on commit 252720c

Please sign in to comment.