File::isOnHardDisk issue with unreachable network

Hi !

I have a problem with File::isOnHardDisk() with file path like this:


In the common case,  it's returning the expected false value.

But if I unplug my network cable, it's returning true !


This is due to the DRIVE_NO_ROOT_DIR value returned by getWindowsDriveType() in this case.

So I fix it by modifying the last line of isOnHardDisk() like this:

return n != DRIVE_CDROM && n != DRIVE_REMOTE && n != DRIVE_NO_ROOT_DIR;

Thanks for your concern about this.

Thanks! That's certainly an edge-case that our unit-tests wouldn't have included! Will take a look..

Thanks again for your reactiviy.