Do not modify TaskBar icons with a similar application directory#1719
Closed
jviotti wants to merge 1 commit intoSquirrel:developfrom
jviotti:fix-symlink-updates
Closed
Do not modify TaskBar icons with a similar application directory#1719jviotti wants to merge 1 commit intoSquirrel:developfrom jviotti:fix-symlink-updates
jviotti wants to merge 1 commit intoSquirrel:developfrom
jviotti:fix-symlink-updates
Conversation
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: ``` if (!shortcut.Target.StartsWith(rootAppDirectory, StringComparison.OrdinalIgnoreCase)) continue; ``` 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` as `C:\\Users\\jv\\AppData\\Local\\PostmanCanary` starts with `C:\\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>
Contributor
|
Alternative solution to #1490 - we should pick one |
Author
|
Closing stale PRs... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.exeC:\\Users\\jv\\AppData\\Local\\PostmanCanary\\PostmanCanary.exeWhen running Squirrel for the first application, Squirrel will
incorrectly update and break the TaskBar symlink pointing to
C:\\Users\\jv\\AppData\\Local\\PostmanCanary\\PostmanCanary.exeasC:\\Users\\jv\\AppData\\Local\\PostmanCanarystarts withC:\\Users\\jv\\AppData\\Local\\Postmanfrom 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