[BaseFile] Safeguard against missing files

This commit is contained in:
Matt Nadareski
2018-02-22 17:33:42 -08:00
parent 4f94fd7270
commit ba9726323c

View File

@@ -106,15 +106,18 @@ namespace SabreTools.Library.FileTypes
{ {
BaseFile temp = Utilities.GetFileInfo(_filename); BaseFile temp = Utilities.GetFileInfo(_filename);
this._filename = temp.Filename; if (temp != null)
this._parent = temp.Parent; {
this._date = temp.Date; this._filename = temp.Filename;
this._crc = temp.CRC; this._parent = temp.Parent;
this._md5 = temp.MD5; this._date = temp.Date;
this._sha1 = temp.SHA1; this._crc = temp.CRC;
this._sha256 = temp.SHA256; this._md5 = temp.MD5;
this._sha384 = temp.SHA384; this._sha1 = temp.SHA1;
this._sha512 = temp.SHA512; this._sha256 = temp.SHA256;
this._sha384 = temp.SHA384;
this._sha512 = temp.SHA512;
}
} }
/// <summary> /// <summary>