mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
Handle null warnings for Platform Structures
This commit is contained in:
parent
bd9b6ed27b
commit
f9066cf291
@ -126,7 +126,7 @@ namespace AssetRipper.Import.Structure.Platforms
|
||||
|
||||
private static bool IsRootLinuxDirectory(DirectoryInfo rootDiectory)
|
||||
{
|
||||
return GetDataLinuxDirectory(rootDiectory, out string _, out string _);
|
||||
return GetDataLinuxDirectory(rootDiectory, out _, out _);
|
||||
}
|
||||
|
||||
private static bool GetDataLinuxDirectory(DirectoryInfo rootDiectory, [NotNullWhen(true)] out string? dataPath, [NotNullWhen(true)] out string? name)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AssetRipper.Import.Structure.Assembly;
|
||||
using AssetRipper.Import.Structure.Assembly;
|
||||
|
||||
namespace AssetRipper.Import.Structure.Platforms
|
||||
{
|
||||
@ -68,7 +68,7 @@ namespace AssetRipper.Import.Structure.Platforms
|
||||
|
||||
private static bool IsRootPS4Directory(DirectoryInfo rootDiectory)
|
||||
{
|
||||
return GetDataDirectory(rootDiectory, out string _);
|
||||
return GetDataDirectory(rootDiectory, out _);
|
||||
}
|
||||
|
||||
private static bool GetDataDirectory(DirectoryInfo rootDiectory, [NotNullWhen(true)] out string? dataPath)
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
return GetDataSwitchDirectory(rootInfo, out string _);
|
||||
return GetDataSwitchDirectory(rootInfo, out _);
|
||||
}
|
||||
|
||||
private static bool GetDataSwitchDirectory(DirectoryInfo rootDirectory, [NotNullWhen(true)] out string? dataPath)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AssetRipper.Import.Structure.Assembly;
|
||||
using AssetRipper.Import.Structure.Assembly;
|
||||
|
||||
namespace AssetRipper.Import.Structure.Platforms
|
||||
{
|
||||
@ -47,7 +47,7 @@ namespace AssetRipper.Import.Structure.Platforms
|
||||
return false;
|
||||
}
|
||||
|
||||
return GetWebPlayerName(dinfo, out string _);
|
||||
return GetWebPlayerName(dinfo, out _);
|
||||
}
|
||||
|
||||
public static bool GetWebPlayerName(DirectoryInfo root, [NotNullWhen(true)] out string? name)
|
||||
@ -56,7 +56,7 @@ namespace AssetRipper.Import.Structure.Platforms
|
||||
{
|
||||
if (fi.Extension == HtmlExtension)
|
||||
{
|
||||
name = fi.Name.Substring(0, fi.Name.Length - HtmlExtension.Length);
|
||||
name = fi.Name[..^HtmlExtension.Length];
|
||||
string abPath = Path.Combine(root.FullName, name + AssetBundleExtension);
|
||||
if (File.Exists(abPath))
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using AssetRipper.Import.Structure.Assembly;
|
||||
using AssetRipper.Import.Structure.Assembly;
|
||||
|
||||
namespace AssetRipper.Import.Structure.Platforms
|
||||
{
|
||||
@ -56,7 +56,7 @@ namespace AssetRipper.Import.Structure.Platforms
|
||||
return false;
|
||||
}
|
||||
|
||||
return GetDataiOSDirectory(root, out string _, out string _, out string _);
|
||||
return GetDataiOSDirectory(root, out _, out _, out _);
|
||||
}
|
||||
|
||||
private static bool GetDataiOSDirectory(DirectoryInfo rootDirectory, [NotNullWhen(true)] out string? dataPath, [NotNullWhen(true)] out string? appPath, [NotNullWhen(true)] out string? appName)
|
||||
@ -77,7 +77,7 @@ namespace AssetRipper.Import.Structure.Platforms
|
||||
if (dinfo.Name.EndsWith(AppExtension, StringComparison.Ordinal))
|
||||
{
|
||||
appPath = dinfo.FullName;
|
||||
appName = dinfo.Name.Substring(0, dinfo.Name.Length - AppExtension.Length);
|
||||
appName = dinfo.Name[..^AppExtension.Length];
|
||||
dataPath = Path.Combine(dinfo.FullName, DataFolderName);
|
||||
if (Directory.Exists(dataPath))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user