mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use index from end expression.
This commit is contained in:
@@ -465,15 +465,15 @@ namespace Aaru.Filesystems.ISO9660
|
||||
return Errno.InvalidArgument;
|
||||
|
||||
KeyValuePair<string, DecodedDirectoryEntry> dirent =
|
||||
parent.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[pieces.Length - 1]);
|
||||
parent.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[^1]);
|
||||
|
||||
if(string.IsNullOrEmpty(dirent.Key))
|
||||
{
|
||||
if(!joliet &&
|
||||
!pieces[pieces.Length - 1].EndsWith(";1", StringComparison.Ordinal))
|
||||
!pieces[^1].EndsWith(";1", StringComparison.Ordinal))
|
||||
{
|
||||
dirent = parent.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) ==
|
||||
pieces[pieces.Length - 1] + ";1");
|
||||
pieces[^1] + ";1");
|
||||
|
||||
if(string.IsNullOrEmpty(dirent.Key))
|
||||
return Errno.NoSuchFile;
|
||||
|
||||
Reference in New Issue
Block a user