Skip to content

Commit

Permalink
Changed the directory the dictionary is expected to be from the worki…
Browse files Browse the repository at this point in the history
…ng directory to the directory of the executing assembly.
  • Loading branch information
Atvaark committed Feb 1, 2015
1 parent 47dcc81 commit 1cfd4e0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FoxTool/FoxTool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Dictionary.txt">
<Content Include="fox_dictionary.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand Down
9 changes: 6 additions & 3 deletions FoxTool/Program.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;
using FoxTool.Fox;

namespace FoxTool
Expand Down Expand Up @@ -123,8 +124,8 @@ private static void DecompileFile(string path)
{
try
{
Console.WriteLine("Reading Dictionary.txt");
ReadGlobalHashNameDictionary("Dictionary.txt");
Console.WriteLine("Reading dictionary");
ReadGlobalHashNameDictionary();
}
catch (Exception e)
{
Expand Down Expand Up @@ -213,8 +214,10 @@ private static List<FileInfo> GetFileList(DirectoryInfo fileDirectory, bool recu
return files;
}

private static void ReadGlobalHashNameDictionary(string path)
private static void ReadGlobalHashNameDictionary()
{
string executingAssemblyLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
string path = Path.Combine(executingAssemblyLocation, "fox_dictionary.txt");
foreach (var line in File.ReadAllLines(path))
{
ulong hash = Hashing.HashString(line);
Expand Down
4 changes: 2 additions & 2 deletions FoxTool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("561aab12-c53d-4a0e-bac5-0efc04a54618")]
[assembly: AssemblyVersion("0.2.2.0")]
[assembly: AssemblyFileVersion("0.2.2.0")]
[assembly: AssemblyVersion("0.2.2.1")]
[assembly: AssemblyFileVersion("0.2.2.1")]
File renamed without changes.

0 comments on commit 1cfd4e0

Please sign in to comment.