Fix getting ISO9660 directory entry when we are using a namespace that excludes file version.

This commit is contained in:
2019-07-24 05:28:48 +01:00
parent ae7c9a9788
commit 3d16477056

View File

@@ -155,7 +155,18 @@ namespace DiscImageChef.Filesystems.ISO9660
KeyValuePair<string, DecodedDirectoryEntry> dirent =
parent.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) == pieces[pieces.Length - 1]);
if(string.IsNullOrEmpty(dirent.Key)) return Errno.NoSuchFile;
if(string.IsNullOrEmpty(dirent.Key))
{
// TODO: RRIP
if(!joliet && !pieces[pieces.Length - 1].EndsWith(";1", StringComparison.Ordinal))
{
dirent = parent.FirstOrDefault(t => t.Key.ToLower(CultureInfo.CurrentUICulture) ==
pieces[pieces.Length - 1] + ";1");
if(string.IsNullOrEmpty(dirent.Key)) return Errno.NoSuchFile;
}
else return Errno.NoSuchFile;
}
entry = dirent.Value;
return Errno.NoError;