Skip to content

Commit

Permalink
Delete all dlls that aren't vanilla
Browse files Browse the repository at this point in the history
  • Loading branch information
TekkaGB committed Sep 5, 2023
1 parent 78104a5 commit 5f499a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions PizzaOven/ModLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public static bool Restart()
if (!banks.Contains(Path.GetFileName(file).ToLowerInvariant()))
File.Delete(file);
// Delete empty folders
// Delete all dlls that aren't vanilla
var dlls = new List<string>(new string[] { "fmod.dll", "fmod-gamemaker.dll", "fmodstudio.dll", "gameframe_x64.dll", "steam_api.dll",
"steam_api64.dll", "steamworks_x64.dll"});
foreach (var file in Directory.GetFiles($"{Global.config.ModsFolder}", "*", SearchOption.TopDirectoryOnly))
if (!dlls.Contains(Path.GetFileName(file).ToLowerInvariant()))
File.Delete(file);
foreach (var directory in Directory.GetDirectories($"{Global.config.ModsFolder}{Global.s}sound{Global.s}Desktop"))
if (Directory.GetFiles(directory).Length == 0 && Directory.GetDirectories(directory).Length == 0)
Directory.Delete(directory, false);
Expand Down

0 comments on commit 5f499a1

Please sign in to comment.