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.
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. Googlewin32api.SetErrorMode(0)
for more information. Sincewin32api
is not packaged with Sublime Text I opted for thectypes.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.