[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,6 +106,8 @@ namespace SabreTools.Library.FileTypes
{
BaseFile temp = Utilities.GetFileInfo(_filename);
if (temp != null)
{
this._filename = temp.Filename;
this._parent = temp.Parent;
this._date = temp.Date;
@@ -116,6 +118,7 @@ namespace SabreTools.Library.FileTypes
this._sha384 = temp.SHA384;
this._sha512 = temp.SHA512;
}
}
/// <summary>
/// Create a new BaseFile from the given file