Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
Latest asar.net, added emotecache deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiiks committed Feb 10, 2016
1 parent dc708de commit 532776a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion WindowsInstaller/BetterDiscordWI/BetterDiscordWI.csproj
Expand Up @@ -41,7 +41,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="asardotnet">
<HintPath>bin\dlls\asardotnet.dll</HintPath>
<HintPath>..\dlls\asardotnet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
24 changes: 24 additions & 0 deletions WindowsInstaller/BetterDiscordWI/panels/Panel2.cs
Expand Up @@ -64,6 +64,30 @@ private void CreateDirectories()
{
_dataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\BetterDiscord";
_tempPath = _dataPath + "\\temp";
AppendLog("Deleting old cached files");
try
{
if (File.Exists(_dataPath + "\\emotes_bttv.json"))
{
File.Delete(_dataPath + "\\emotes_bttv.json");
}
if (File.Exists(_dataPath + "\\emotes_bttv_2.json"))
{
File.Delete(_dataPath + "\\emotes_bttv_2.json");
}
if (File.Exists(_dataPath + "\\emotes_ffz.json")) {
File.Delete(_dataPath + "\\emotes_ffz.json");
}
if (File.Exists(_dataPath + "\\emotes_twitch_global.json")) {
File.Delete(_dataPath + "\\emotes_twitch_global.json");
}
if (File.Exists(_dataPath + "\\emotes_twitch_subscriber.json")) {
File.Delete(_dataPath + "\\emotes_twitch_subscriber.json");
}
if (File.Exists(_dataPath + "\\user.json")) {
File.Delete(_dataPath + "\\user.json");
}
} catch (Exception e) { AppendLog("Failed to delete one or more cached files"); }
if (Directory.Exists(_tempPath))
Expand Down
Binary file modified WindowsInstaller/dlls/asardotnet.dll
Binary file not shown.

0 comments on commit 532776a

Please sign in to comment.