mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Make sure we're not referring to some other guy's app
This commit is contained in:
@@ -168,6 +168,10 @@ namespace Squirrel
|
||||
executable = executable ??
|
||||
Path.GetDirectoryName(typeof(UpdateManager).Assembly.Location);
|
||||
|
||||
if (!executable.StartsWith(rootAppDirectory, StringComparison.OrdinalIgnoreCase)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var appDirName = executable.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar)
|
||||
.FirstOrDefault(x => x.StartsWith("app-", StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user