AutoFileName icon indicating copy to clipboard operation
AutoFileName copied to clipboard

Prevent 'Drive Not Ready' on completion for removable drives.

Open Jule- opened this issue 7 years ago • 0 comments

I am not a Python expert but I found some code to adapt, all credits to Adam Rosenfield : http://stackoverflow.com/a/4790310/4861714.

Fix issue #62. This issue is due to os.path.exists() method called on removable drives on Windows. It shows an error message box because Windows handle the 'Drive Not Ready' error itself. Google win32api.SetErrorMode(0) for more information. Since win32api is not packaged with Sublime Text I opted for the ctypes.cdll.kernel32.GetLogicalDrives() solution.

I have not tested my patch on other platforms but for what I understand from code the get_drives method is Windows specific so it should not impact other platforms.

Jule- avatar Nov 23 '16 11:11 Jule-