Skip to content

Commit

Permalink
bug 紧急修复
Browse files Browse the repository at this point in the history
  • Loading branch information
Grey-Wind committed Aug 17, 2023
1 parent cbd5fb5 commit 5ef1c0b
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions FFmpegUpdater/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

// 下面开始添加Path
string appDirectory = AppDomain.CurrentDomain.BaseDirectory;
string ffmpegBinPath = Path.Combine(appDirectory, "ffmpeg", "bin");
string ffmpegBinPath = Path.Combine(appDirectory, "ffmpeg-master-latest-win64-gpl-shared", "bin");

Console.WriteLine("请选择要添加路径的类型:");
Console.WriteLine("1. 用户路径");
Expand Down Expand Up @@ -117,6 +117,7 @@ static string GetTargetString(EnvironmentVariableTarget target)
return target == EnvironmentVariableTarget.Machine ? "M" : "U";
}

// 以管理员重启
static void RestartAsAdministrator()
{
string fileName = "FFmpegUpdater.exe";
Expand All @@ -133,17 +134,7 @@ static void RestartAsAdministrator()
Environment.Exit(0);// 关闭
}












// 下载逻辑
void Download(string url, string folderPath, string fileName)
{
string filePath = Path.Combine(folderPath, fileName);
Expand All @@ -161,6 +152,7 @@ void Download(string url, string folderPath, string fileName)
}
}

// 删除逻辑
void Delete(string name)
{
if (Directory.Exists(name))
Expand Down

0 comments on commit 5ef1c0b

Please sign in to comment.