Mantis - Squeak
Viewing Issue Advanced Details
7841 VM minor always 11-16-15 08:58 11-16-15 20:57
Nicolai Hess  
lewis  
normal  
assigned  
open  
none    
none  
0007841: error "please insert disk" (windows vm)
If you have a device (usb card reader) and eject the disk/card. Every access
on the directory list, that will ask the drive if it is empty, will
trigger a modal dialog:
"There is no disk in the drive. Please insert a disk into drive <etc>"

There is no way to bypass this error message dialog from within the image.
We need a change for the squeak windows vm.
see thread http://forum.world.st/error-please-insert-disk-windows-vm-tp4859473.html [^]
 bug_7841_error_insert_disk.patch [^] (1,749 bytes) 11-16-15 20:56

Notes
(0014563)
Nicolai Hess   
11-16-15 09:00   
The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).
(0014565)
Nicolai Hess   
11-16-15 20:57   
attached a patch with the suggested fix.