mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[BaseFile] Safeguard against missing files
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user