File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
SabreTools.Serialization/Wrappers Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -361,13 +361,13 @@ public ulong GetExpandedFileSize(int index)
361
361
/// Get the file descriptor at a given index, if possible
362
362
/// </summary>
363
363
/// <remarks>Verifies the file descriptor flags before returning</remarks>
364
- public FileDescriptor ? GetFileDescriptorWithVerification ( int index , out string ? error )
364
+ public bool TryGetFileDescriptor ( int index , out FileDescriptor ? fileDescriptor )
365
365
{
366
- var fileDescriptor = GetFileDescriptor ( index ) ;
366
+ fileDescriptor = GetFileDescriptor ( index ) ;
367
367
if ( fileDescriptor == null )
368
368
{
369
- error = $ "Failed to get file descriptor for file { index } ";
370
- return null ;
369
+ Console . Error . WriteLine ( $ "Failed to get file descriptor for file { index } ") ;
370
+ return false ;
371
371
}
372
372
373
373
#if NET20 || NET35
@@ -376,12 +376,11 @@ public ulong GetExpandedFileSize(int index)
376
376
if ( fileDescriptor . Flags . HasFlag ( FileFlags . FILE_INVALID ) || fileDescriptor . DataOffset == 0 )
377
377
#endif
378
378
{
379
- error = $ "File at { index } is marked as invalid";
380
- return null ;
379
+ Console . Error . WriteLine ( $ "File at { index } is marked as invalid") ;
380
+ return false ;
381
381
}
382
382
383
- error = null ;
384
- return fileDescriptor ;
383
+ return true ;
385
384
}
386
385
387
386
/// <summary>
You can’t perform that action at this time.
0 commit comments