diff --git a/src/Foundatio.Redis/Storage/RedisFileStorage.cs b/src/Foundatio.Redis/Storage/RedisFileStorage.cs index daa4113..ad59a80 100644 --- a/src/Foundatio.Redis/Storage/RedisFileStorage.cs +++ b/src/Foundatio.Redis/Storage/RedisFileStorage.cs @@ -154,7 +154,7 @@ public async Task RenameFileAsync(string path, string newPath, Cancellatio try { - var stream = await GetFileStreamAsync(normalizedPath, cancellationToken).AnyContext(); + var stream = await GetFileStreamAsync(normalizedPath, StreamMode.Read, cancellationToken).AnyContext(); return await DeleteFileAsync(normalizedPath, cancellationToken).AnyContext() && await SaveFileAsync(normalizedNewPath, stream, cancellationToken).AnyContext(); } @@ -178,7 +178,7 @@ public async Task CopyFileAsync(string path, string targetPath, Cancellati try { - using var stream = await GetFileStreamAsync(normalizedPath, cancellationToken).AnyContext(); + using var stream = await GetFileStreamAsync(normalizedPath, StreamMode.Read, cancellationToken).AnyContext(); if (stream == null) return false;