remove wsh s3 dependency (#1994)

This commit is contained in:
Mike Sawka 2025-02-18 18:52:32 -08:00 committed by GitHub
parent ccf4aab277
commit 8d9e4b8dfd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,8 +14,8 @@ import (
"sync"
"time"
"github.com/wavetermdev/waveterm/pkg/remote/fileshare"
"github.com/wavetermdev/waveterm/pkg/wshrpc"
"github.com/wavetermdev/waveterm/pkg/wshrpc/wshclient"
"golang.org/x/sync/singleflight"
)
@ -155,7 +155,7 @@ func listS3Directory(ctx context.Context, widgetId string, conn string, dir stri
// Ensure only one operation populates the cache for this key.
value, err, _ := group.Do(key, func() (interface{}, error) {
path := conn + ":s3://" + dir
entries, err := fileshare.ListEntries(ctx, path, &wshrpc.FileListOpts{Limit: maxFiles})
entries, err := wshclient.FileListCommand(wshclient.GetBareRpcClient(), wshrpc.FileListData{Path: path, Opts: &wshrpc.FileListOpts{Limit: maxFiles}}, nil)
if err != nil {
return nil, err
}