-
Notifications
You must be signed in to change notification settings - Fork 86
Remove use of 'fsutil' during Windows detection #265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove use of 'fsutil' during Windows detection #265
Conversation
The 'fsutil' command requires administrator privileges, this change changes the detection to use multiple calls to the Windows command 'dir' to check which drives are ready.
|
Could you please review @theotherjimmy ? |
|
Well that's weird, works just fine on my Windows box. I'll try it in my VM. |
test/os_win7.py
Outdated
|
|
||
| _cliproc.return_value = (b'\nDrives: C:\ F:\ Z:\ \n', None, 0) | ||
|
|
||
| def _mounted_drives_check(drives): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this function outside of the test?
|
Thanks for the update. @MarceloSalazar You could use a new release with this change set correct? |
|
|
Thanks @bridadan @theotherjimmy for the quick fix! |
|
@bridadan @theamirocohen me too!! Thanks for your fix! :-) |
|
Great to hear, thanks for testing @MarceloSalazar and @toyowata! |
Should fix #263 and #264.
In #241, I modified the detection process for Windows to use the fsutil program that ships with Windows. It provides a very fast way to detect what drive letters are currently available on the system. However, I missed this very important fact (spelled out in plain ol' English on their doc page):
😞
This PR changes the drive detection to the following:
dircommandos.path.exists?!?!"FYI @toyowata @MarceloSalazar