Skip to content

Commit 1cfd4e0

Browse files
committedFeb 1, 2015
Changed the directory the dictionary is expected to be from the working directory to the directory of the executing assembly.
1 parent 47dcc81 commit 1cfd4e0

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed
 

‎FoxTool/FoxTool.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
449449
<None Include="packages.config" />
450450
</ItemGroup>
451451
<ItemGroup>
452-
<Content Include="Dictionary.txt">
452+
<Content Include="fox_dictionary.txt">
453453
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
454454
</Content>
455455
</ItemGroup>

‎FoxTool/Program.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Collections.Generic;
33
using System.IO;
44
using System.Linq;
5+
using System.Reflection;
56
using FoxTool.Fox;
67

78
namespace FoxTool
@@ -123,8 +124,8 @@ private static void DecompileFile(string path)
123124
{
124125
try
125126
{
126-
Console.WriteLine("Reading Dictionary.txt");
127-
ReadGlobalHashNameDictionary("Dictionary.txt");
127+
Console.WriteLine("Reading dictionary");
128+
ReadGlobalHashNameDictionary();
128129
}
129130
catch (Exception e)
130131
{
@@ -213,8 +214,10 @@ private static List<FileInfo> GetFileList(DirectoryInfo fileDirectory, bool recu
213214
return files;
214215
}
215216

216-
private static void ReadGlobalHashNameDictionary(string path)
217+
private static void ReadGlobalHashNameDictionary()
217218
{
219+
string executingAssemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
220+
string path = Path.Combine(executingAssemblyLocation, "fox_dictionary.txt");
218221
foreach (var line in File.ReadAllLines(path))
219222
{
220223
ulong hash = Hashing.HashString(line);

‎FoxTool/Properties/AssemblyInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
[assembly: AssemblyCulture("")]
1212
[assembly: ComVisible(false)]
1313
[assembly: Guid("561aab12-c53d-4a0e-bac5-0efc04a54618")]
14-
[assembly: AssemblyVersion("0.2.2.0")]
15-
[assembly: AssemblyFileVersion("0.2.2.0")]
14+
[assembly: AssemblyVersion("0.2.2.1")]
15+
[assembly: AssemblyFileVersion("0.2.2.1")]
File renamed without changes.

0 commit comments

Comments
 (0)
Please sign in to comment.