Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions NebulaWorld/SocialIntegration/DiscordManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,21 @@
var gameDir = new FileInfo(Environment.GetCommandLineArgs()[0]);
if (gameDir.DirectoryName != null)
{
var steamAppIdFile = Path.Combine(gameDir.DirectoryName, "steam_appid.txt");
if (!File.Exists(steamAppIdFile))
try
{
File.WriteAllText(steamAppIdFile, "1366540");
var steamAppIdFile = Path.Combine(gameDir.DirectoryName, "steam_appid.txt");
if (!File.Exists(steamAppIdFile))

Check warning on line 55 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check warning on line 55 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check warning on line 55 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check warning on line 55 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
{
File.WriteAllText(steamAppIdFile, "1366540");
}
}
catch (IOException ex)
{
Log.Warn($"Failed to write steam_appid.txt: {ex.Message}");
}
catch (UnauthorizedAccessException ex)

Check warning on line 64 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check warning on line 64 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Debug)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check warning on line 64 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)

Check warning on line 64 in NebulaWorld/SocialIntegration/DiscordManager.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Fix formatting (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0055)
{
Log.Warn($"Access denied writing steam_appid.txt: {ex.Message}");
}
}

Expand Down
Loading