Rob Cliffe via Python-list <[email protected]>  wrote:
> When the RAM disc is empty,
>      os.scandir("R:")
> raises a FileNotFoundError instead of (as I would have expected) returning an 
> empty iterator.

os.scandir is a simple wrapper around FindFirstFile/FindNextFile.  If 
FindFirstFileW("R:", "*.*") sets the file-not-found Windows error code, then 
that will be turned into the exception that you see.

You might want to try os.scandir("R:\\").  Your issue could have something to 
do with the current directory for the R: drive not being well-defined.

regards, Anders
-- 
https://mail.python.org/mailman3//lists/python-list.python.org

Reply via email to