Skip to content

Commit

Permalink
Should be last fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
MainMemory committed Dec 31, 2015
1 parent b6cfb52 commit 923634f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PVM2TexPack/Program.cs
Expand Up @@ -31,7 +31,7 @@ static void Main(string[] args)
{
if (PvrTexture.Is(filedata))
{
if (!AddTexture(false, path, filename, new MemoryStream(filedata), texList))
if (!AddTexture(false, path, Path.GetFileName(filename), new MemoryStream(filedata), texList))
{
texList.Close();
Directory.Delete(path, true);
Expand All @@ -40,7 +40,7 @@ static void Main(string[] args)
}
else if (GvrTexture.Is(filedata))
{
if (!AddTexture(true, path, filename, new MemoryStream(filedata), texList))
if (!AddTexture(true, path, Path.GetFileName(filename), new MemoryStream(filedata), texList))
{
texList.Close();
Directory.Delete(path, true);
Expand Down Expand Up @@ -94,7 +94,7 @@ static bool AddTexture(bool gvm, string path, string filename, Stream data, Text
catch { bmp = new Bitmap(1, 1); }
bmp.Save(Path.Combine(path, Path.ChangeExtension(filename, "png")));
bmp.Dispose();
index.WriteLine("{0},{1}", vrfile.HasGlobalIndex ? vrfile.GlobalIndex : uint.MaxValue, filename + ".png");
index.WriteLine("{0},{1}", vrfile.HasGlobalIndex ? vrfile.GlobalIndex : uint.MaxValue, Path.ChangeExtension(filename, "png"));
return true;
}
}
Expand Down

0 comments on commit 923634f

Please sign in to comment.