Skip to content

Commit 0c0d54d

Browse files
committed
remove s3directory change
1 parent d52eaf5 commit 0c0d54d

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

sdk/src/Services/S3/Custom/Transfer/Internal/DownloadDirectoryCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ private void ValidateRequest()
196196
throw new InvalidOperationException("The LocalDirectory Specified is null or empty!");
197197
}
198198

199-
if (File.Exists(this._request.LocalDirectory))
199+
if (File.Exists(this._request.S3Directory))
200200
{
201201
throw new InvalidOperationException("A file already exists with the same name indicated by LocalDirectory!");
202202
}

sdk/test/Services/S3/UnitTests/Custom/DownloadDirectoryCommandTests.cs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -173,32 +173,6 @@ public async Task ExecuteAsync_WithMissingLocalDirectory_ThrowsInvalidOperationE
173173
await command.ExecuteAsync(CancellationToken.None);
174174
}
175175

176-
[TestMethod]
177-
[ExpectedException(typeof(InvalidOperationException))]
178-
public async Task ExecuteAsync_WithFileExistingAtLocalDirectoryPath_ThrowsInvalidOperationException()
179-
{
180-
// Arrange - Create a file with the same name as the local directory
181-
var testFilePath = Path.Combine(Path.GetTempPath(), $"test-file-{Guid.NewGuid()}.tmp");
182-
File.WriteAllText(testFilePath, "test");
183-
184-
try
185-
{
186-
var request = CreateDownloadDirectoryRequest(localDirectory: testFilePath);
187-
var command = new DownloadDirectoryCommand(_mockS3Client.Object, request, _config, useMultipartDownload: false);
188-
189-
// Act - This should throw InvalidOperationException, not NullReferenceException
190-
await command.ExecuteAsync(CancellationToken.None);
191-
}
192-
finally
193-
{
194-
// Cleanup
195-
if (File.Exists(testFilePath))
196-
{
197-
File.Delete(testFilePath);
198-
}
199-
}
200-
}
201-
202176
#endregion
203177

204178
#region ExecuteAsync Tests - Empty Directory

0 commit comments

Comments
 (0)