Don't use StartupPath because it will be wrong in some cases

This commit is contained in:
Jaex 2016-02-10 01:09:56 +02:00
parent 7c1bd7e51d
commit ca8d2aad47

View file

@ -62,11 +62,11 @@ public static bool ExtractFFmpeg(string zipPath, string extractPath)
{
if (NativeMethods.Is64Bit())
{
SevenZipExtractor.SetLibraryPath(Path.Combine(Application.StartupPath, "7z-x64.dll"));
SevenZipExtractor.SetLibraryPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7z-x64.dll"));
}
else
{
SevenZipExtractor.SetLibraryPath(Path.Combine(Application.StartupPath, "7z.dll"));
SevenZipExtractor.SetLibraryPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "7z.dll"));
}
Helpers.CreateDirectoryIfNotExist(extractPath);