Skip to content

Commit

Permalink
adds build required OSPlaatform calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Ersan Bozduman committed Nov 30, 2023
1 parent 9f653ee commit 16f697f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion FileUploader/FileUpload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public static class FileUpload
{
private static bool IsWindows()
{
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
return System.OSPlatform.Windows;

Check failure on line 35 in FileUploader/FileUpload.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, Release, 7.0.x)

The type or namespace name 'OSPlatform' does not exist in the namespace 'System' (are you missing an assembly reference?)

Check failure on line 35 in FileUploader/FileUpload.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, Release, 7.0.x)

The type or namespace name 'OSPlatform' does not exist in the namespace 'System' (are you missing an assembly reference?)

}

private static async Task Main(string[] args)
Expand Down
3 changes: 2 additions & 1 deletion Minio.Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ await SetBucketReplication.Run(minioClient, bucketName, destBucketName, replicat
File.Delete(smallFileName);
File.Delete(bigFileName);

if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) _ = Console.ReadLine();
if (System.OSPlatform.Windows;) _ = Console.ReadLine();

Check failure on line 285 in Minio.Examples/Program.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, Release, 7.0.x)

) expected

Check failure on line 285 in Minio.Examples/Program.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, Release, 7.0.x)

} expected

Check failure on line 285 in Minio.Examples/Program.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, Release, 7.0.x)

) expected

Check failure on line 285 in Minio.Examples/Program.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, Release, 7.0.x)

} expected

}
}
2 changes: 1 addition & 1 deletion Minio.Functional.Tests/FunctionalTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4826,7 +4826,7 @@ internal static async Task GetObject_3_OffsetLength_Tests(IMinioClient minio)
{
expectedFileSize = objectSize - offsetToStartFrom;
var noOfCtrlChars = 1;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) noOfCtrlChars = 2;
if (System.OSPlatform.Windows) noOfCtrlChars = 2;

expectedContent = string.Concat(line)
.Substring(offsetToStartFrom, expectedFileSize - noOfCtrlChars);
Expand Down

0 comments on commit 16f697f

Please sign in to comment.