Skip to content

Commit

Permalink
Fixed a bug causing the dictionaries to not be read when using the op…
Browse files Browse the repository at this point in the history
…en with functionality.
  • Loading branch information
BobDoleOwndU committed Aug 27, 2021
1 parent 6a3cb35 commit cb01859
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions FvTwool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
19 changes: 11 additions & 8 deletions FvTwool/Static/Hashing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;

namespace FvTwool
{
Expand Down Expand Up @@ -158,14 +159,16 @@ public static class Hashing

static Hashing()
{
if (File.Exists("qar_dictionary.txt"))
ReadQARDictionary("qar_dictionary.txt");
if (File.Exists("fmdl_dictionary.txt"))
ReadFmdlDictionary("fmdl_dictionary.txt");
if (File.Exists("cust_qar_dictionary.txt"))
ReadQARDictionary("cust_qar_dictionary.txt");
if (File.Exists("cust_fmdl_dictionary.txt"))
ReadFmdlDictionary("cust_fmdl_dictionary.txt");
string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

if (File.Exists($"{path}\\qar_dictionary.txt"))
ReadQARDictionary($"{path}\\qar_dictionary.txt");
if (File.Exists($"{path}\\fmdl_dictionary.txt"))
ReadFmdlDictionary($"{path}\\fmdl_dictionary.txt");
if (File.Exists($"{path}\\cust_qar_dictionary.txt"))
ReadQARDictionary($"{path}\\cust_qar_dictionary.txt");
if (File.Exists($"{path}\\cust_fmdl_dictionary.txt"))
ReadFmdlDictionary($"{path}\\cust_fmdl_dictionary.txt");
} //constructor

public static ulong HashFileExtension(string fileExtension) //from private to public
Expand Down

0 comments on commit cb01859

Please sign in to comment.