Skip to content

Commit

Permalink
what is dir.Split('\\').Last() ???
Browse files Browse the repository at this point in the history
  • Loading branch information
yueyinqiu committed May 10, 2024
1 parent 5de34cc commit 19610dd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public static async IAsyncEnumerable<GameModResolvedInfo> ResolveModListAsync(

if (!File.Exists(iconPath)) return null;

var fileName = dir.Split('\\').Last();
var fileName = Path.GetFileName(dir);
var imageBytes = await File.ReadAllBytesAsync(iconPath, ct);
string? description = null;
var version = -1;
Expand Down Expand Up @@ -371,7 +371,7 @@ public static async IAsyncEnumerable<GameResourcePackResolvedInfo> ResolveResour

if (!Directory.Exists(shaderPath)) return null;

return new GameShaderPackResolvedInfo(dir.Split('\\').Last(), true);
return new GameShaderPackResolvedInfo(Path.GetFileName(dir), true);
}

public static IEnumerable<GameShaderPackResolvedInfo> ResolveShaderPack(
Expand Down

0 comments on commit 19610dd

Please sign in to comment.