-
Notifications
You must be signed in to change notification settings - Fork 1
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
SG-36346 Dynamic hard drive lookup in windows #204
base: master
Are you sure you want to change the base?
SG-36346 Dynamic hard drive lookup in windows #204
Conversation
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.
LGTM!
For testing, please ask @robomobo to take a look
startup.py
Outdated
# of the supported operating systems. The templates are used for both | ||
# globbing and regex matches by replacing the named format placeholders | ||
# with an appropriate glob or regex string. | ||
self.EXECUTABLE_TEMPLATES = { |
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.
I'm not a big fan of overwritting the EXECUTABLE_TEMPLATES
variable. Upper case variables are constants by conventions.
Could you instead create a new local variable and make sure it's used in the rest of the function?
Description
Introducing
win32api.GetLogicalDriveStrings()
to get the list of available drive letters in Windows.In terms of performance,
win32api.GetLogicalDriveStrings()
is generally very fast and efficient. It directly interfaces with the Windows API to get the list of logical drives, which is a relatively quick operation.Regarding the
glob
search, I've done lookup tests with a few different drive letters and it works with no major difference in performance.Testing
Install Alias software in a different drive than C:. SGD should be able to locate the software and add its icon normally.