<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>we have the following bug report<br><a class="" href="https://pharo.fogbugz.com/f/cases/16928/no-disk-in-the-drive-reply-to-World-Save-As-and-other-places">16928</a> &quot;no disk in the drive&quot; reply to World | Save As (and other places)<br><br>&quot;On a clean Pharo4.0 #40618 image, on Windows 7<br>
World Menu | Save As brings up a modal alert window, &quot;There is no disk 
in the drive. Please insert a disk into drive &lt;etc&gt;&quot;<br>
<br>
On my system, it does this 4 times.  <br>
<br>
I&#39;m assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.<br>
<br>
This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.<br>
<br>
Could the alerts either be <br>
 - only raised when that specific drive is requested by a user action<br>
or, less preferably<br>
 - given by a non-modal window, and fading away after a period&quot;<br><br></div><div>I was able to reproduce this error on squeaks and pharos window vm.<br></div><div>(insert a usb card reader, with card, wait some time , remove only the card,<br></div><div>every access on this drive, for example open a FileList and scroll to the drive letter).<br></div><div><br><br></div>The solution I found is to call SetErrorMode(<strong>SEM_FAILCRITICALERRORS)<br></strong><br>I would like to propose the following change to sqwin32directory.c<br></div>wrap the call to FindFirstFileW/FindNextFileW with<br><br></div>UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);<br></div>call   FindFirstFileW/FindNextFileW<br></div>SetErrorMode(prevMode);<br></div><br>...<br><br></div>and call this functions in at least dir_lookup()<br></div>(the other file/directory methods are save).<br><br></div>Alternative solution, we could call the SetErrorMode function once at program start<br></div>but I don&#39;t know if there are other &quot;useful&quot; errors message that we don&#39;t want to disable.<br><br></div><div>I tested both solution, both seems to work fine.<br><br></div>What do you think?<br><div><div><div><div><div><br><br><br><br></div></div></div></div></div></div>