Latest asar.net, added emotecache deletion

This commit is contained in:
Jiiks 2016-02-10 04:27:04 +02:00
parent dc708de857
commit 532776a696
3 changed files with 25 additions and 1 deletions

View File

@ -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" />

View File

@ -64,6 +64,30 @@ namespace BetterDiscordWI.panels
{
_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))

Binary file not shown.