[BaseFile] Set filename properly

This commit is contained in:
Matt Nadareski
2018-02-23 11:15:22 -08:00
parent 02421f93d0
commit d3fcd84ef0

View File

@@ -104,11 +104,11 @@ namespace SabreTools.Library.FileTypes
/// <param name="filename">Name of the file to use</param> /// <param name="filename">Name of the file to use</param>
public BaseFile(string filename) public BaseFile(string filename)
{ {
this._filename = filename;
BaseFile temp = Utilities.GetFileInfo(_filename); BaseFile temp = Utilities.GetFileInfo(_filename);
if (temp != null) if (temp != null)
{ {
this._filename = temp.Filename;
this._parent = temp.Parent; this._parent = temp.Parent;
this._date = temp.Date; this._date = temp.Date;
this._crc = temp.CRC; this._crc = temp.CRC;
@@ -129,7 +129,7 @@ namespace SabreTools.Library.FileTypes
{ {
BaseFile temp = Utilities.GetStreamInfo(stream, stream.Length); BaseFile temp = Utilities.GetStreamInfo(stream, stream.Length);
this._filename = temp.Filename; this._filename = filename;
this._parent = temp.Parent; this._parent = temp.Parent;
this._date = temp.Date; this._date = temp.Date;
this._crc = temp.CRC; this._crc = temp.CRC;