Fixed path conversion on Windows
This commit is contained in:
@@ -236,7 +236,13 @@ namespace Duplicati.Library.Backend
|
||||
|
||||
/// <inheritdoc/>
|
||||
public IAsyncEnumerable<IFileEntry> ListAsync(string path, CancellationToken cancellationToken)
|
||||
=> m_s3Client.ListBucketAsync(m_bucket, path, false, cancellationToken);
|
||||
{
|
||||
var filterPath = GetFullKey(path);
|
||||
if (!string.IsNullOrWhiteSpace(filterPath))
|
||||
filterPath = Util.AppendDirSeparator(filterPath, "/");
|
||||
|
||||
return m_s3Client.ListBucketAsync(m_bucket, filterPath, true, cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -410,13 +410,9 @@ namespace Duplicati.Library.Backend
|
||||
/// <inheritdoc/>
|
||||
public IAsyncEnumerable<IFileEntry> ListAsync(string path, CancellationToken cancellationToken)
|
||||
{
|
||||
var prefix = m_prefix;
|
||||
if (!string.IsNullOrWhiteSpace(prefix))
|
||||
prefix = Util.AppendDirSeparator(prefix);
|
||||
|
||||
var filterPath = prefix + path;
|
||||
var filterPath = GetFullKey(path);
|
||||
if (!string.IsNullOrWhiteSpace(filterPath))
|
||||
filterPath = Util.AppendDirSeparator(filterPath);
|
||||
filterPath = Util.AppendDirSeparator(filterPath, "/");
|
||||
|
||||
return s3Client.ListBucketAsync(m_bucket, filterPath, m_recurseLists, cancellationToken);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class BackendSourceFileEntry(BackendSourceProvider parent, string path, b
|
||||
if (!isFolder)
|
||||
throw new InvalidOperationException("Enumerate can only be called on folders");
|
||||
|
||||
return parent.WrappedBackend.ListAsync(path, cancellationToken)
|
||||
return parent.WrappedBackend.ListAsync(NormalizePathTo(path, '/'), cancellationToken)
|
||||
// Remove the current and parent folder entries
|
||||
.Where(x => !string.IsNullOrWhiteSpace(x.Name) && x.Name != "." && x.Name != "..")
|
||||
// Remove sub-folder entries
|
||||
|
||||
Reference in New Issue
Block a user