Make sure we're not referring to some other guy's app

This commit is contained in:
Paul Betts
2014-09-02 14:59:01 -07:00
parent e123243f1d
commit 95e802f940

View File

@@ -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));