Do not modify TaskBar icons with a similar application directory #1719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When this program runs, it loops over all the symlinks created in the
user's TaskBar in an attempt to update the symlinks corresponding to the
application being installed.
The logic goes like this:
Now consider two applications where the application root directory of
the first starts with the application root directory of the second:
C:\\Users\\jv\\AppData\\Local\\Postman\\Postman.exe
C:\\Users\\jv\\AppData\\Local\\PostmanCanary\\PostmanCanary.exe
When running Squirrel for the first application, Squirrel will
incorrectly update and break the TaskBar symlink pointing to
C:\\Users\\jv\\AppData\\Local\\PostmanCanary\\PostmanCanary.exe
asC:\\Users\\jv\\AppData\\Local\\PostmanCanary
starts withC:\\Users\\jv\\AppData\\Local\\Postman
from a string point of view.This commit ensures that we only modify TaskBar symlinks with the same
application directory, ignoring other application directories that share
the same prefix string.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com