remove duplicate startup entries#3012
remove duplicate startup entries#3012database64128 merged 5 commits intoshadowsocks:masterfrom ahmadalli:master
Conversation
fixes #3011 Signed-off-by: ahmadali shafiee <mail@ahmadalli.net>
chenshaoju
left a comment
There was a problem hiding this comment.
👍 Looks good to me, but someone else must approve.
|
The status of the It's impossible to have duplicate registry entries, unless you manually add them after starting the app. Or the check process may have failed to cover some edge cases. |
|
as I've explained on #3011, I've experienced it after upgrade. I'm not sure from which version but I guess it was from 4.2.1 to 4.3.0. I was experiencing the issue on two different machines |
|
also there's an issue with the if the loop reaches the |
|
Please take another look at As for the issue, I doubt if it's caused by the update. Can you reproduce it and provide detailed steps? |
|
the lets assume whe the foreach loop reaches the |
Signed-off-by: ahmadali shafiee <mail@ahmadalli.net>
It's impossible to have duplicate registry entries in the first place, unless you manually add them after starting the app, which shouldn't be covered by the checker. |
Signed-off-by: ahmadali shafiee <mail@ahmadalli.net>
the case |
|
I've fixed the issue of check method on my latest commit. the only difference is that I don't just check for |
|
here's a detailed way to reproduce this issue:
and there will be two |
|
and the current
|
Signed-off-by: ahmadali shafiee <mail@ahmadalli.net>
|
Thank you for your contribution and detailed explanations! 😊 |
|
yw ;) if you're going to merge it now, just let me adjust one more thing |
Signed-off-by: ahmadali shafiee <mail@ahmadalli.net>
| // see https://stackoverflow.com/questions/12945805/odd-c-sharp-path-issue | ||
|
|
||
| private static string Key = "Shadowsocks_" + Program.ExecutablePath.GetHashCode(); |
There was a problem hiding this comment.
string.GetHashCode() are not guranteed same between different versions, it's the possible reason why there's two different entry.
There was a problem hiding this comment.
true, the other issue is that the source string (which we calculate hash of) has been changed from ced49e2. it used to be hash of Application.StartupPath but it changed to Program.ExecutablePath
What is the purpose of your pull request?
Description of your pull request and other information
fixes #3011