Skip to content

Commit 65293b0

Browse files
committed
Fix loading binary data from deleted files in GTK
The dialog keeps info about last operation. This patch checks that last file exists before reading it (thanks, Crisis)
1 parent 128e2dc commit 65293b0

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
found (Alberto Garcia).
1111
* WidgetUI: rearrange AY register and Z80 flags in the debugger
1212
(Gergely Szasz).
13+
* GTK UI: Fix loading binary data from deleted files (thanks, Crisis).
1314

1415
2021-02-27 Philip Kendall <philip-fuse@shadowmagic.org.uk>
1516

ui/gtk/binary.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ menu_file_loadbinarydata( GtkAction *gtk_action GCC_UNUSED,
200200
* If the filename is blank it's not been selected previously.
201201
* Pop up the file selector.
202202
*/
203-
if( !load_info.filename )
203+
if( !load_info.filename || !compat_file_exists( load_info.filename ) )
204204
{
205205
load_info.filename = ui_get_open_filename( "Fuse - Load Binary Data" );
206206
if( !load_info.filename )

0 commit comments

Comments
 (0)