mirror of
https://github.com/Grace-Solutions/PSMinIO.git
synced 2026-08-12 22:06:55 +00:00
Upgrade to MinIO 5.0.0 and include built module
- Updated MinIO SDK from 3.1.13 to 5.0.0 - Fixed all compilation errors and warnings for MinIO 5.0.0 compatibility - Updated API calls to use new Args-based patterns (PutObjectArgs, GetObjectArgs, etc.) - Fixed type compatibility issues (DateTime, ulong conversions) - Removed deprecated APIs (WithCancellation, ProgressReport) - Updated System.Text.Json to 9.0.0 to resolve security vulnerabilities - Added Module directory to repository with built PSMinIO.dll - Module is now ready for distribution and testing - All builds pass with 0 errors and 0 warnings
This commit is contained in:
@@ -50,7 +50,7 @@ namespace PSMinIO.Cmdlets
|
||||
/// </summary>
|
||||
protected override void ProcessRecord()
|
||||
{
|
||||
ValidateConfiguration();
|
||||
ValidateConnection();
|
||||
ValidateBucketName(BucketName);
|
||||
ValidateObjectName(ObjectName);
|
||||
ValidateAndPrepareFilePath();
|
||||
@@ -115,11 +115,13 @@ namespace PSMinIO.Cmdlets
|
||||
FilePath.Refresh(); // Refresh to get updated file info
|
||||
WriteObject(FilePath);
|
||||
}
|
||||
#pragma warning disable CS0168 // Variable is declared but never used - false positive, ex is used in throw
|
||||
catch (Exception ex)
|
||||
{
|
||||
progressReporter.Complete();
|
||||
throw;
|
||||
}
|
||||
#pragma warning restore CS0168
|
||||
|
||||
}, $"Bucket: {BucketName}, Object: {ObjectName}, File: {FilePath.FullName}");
|
||||
}
|
||||
@@ -140,7 +142,7 @@ namespace PSMinIO.Cmdlets
|
||||
}
|
||||
|
||||
// Check if file already exists
|
||||
if (FilePath.Exists && !Force.IsPresent)
|
||||
if (FilePath!.Exists && !Force.IsPresent)
|
||||
{
|
||||
WriteError(new ErrorRecord(
|
||||
new InvalidOperationException($"File '{FilePath.FullName}' already exists. Use -Force to overwrite."),
|
||||
|
||||
Reference in New Issue
Block a user