fix: sftp download/upload (#255)

This commit is contained in:
lollipopkit
2024-01-26 16:54:48 +08:00
parent 9edbc5cc89
commit 6c08b7b45d
4 changed files with 24 additions and 24 deletions

View File

@@ -1,6 +1,5 @@
import 'dart:async';
import 'package:computer/computer.dart';
import 'package:dartssh2/dartssh2.dart';
import 'package:flutter/foundation.dart';
import 'package:toolbox/data/model/app/error.dart';
@@ -121,6 +120,7 @@ Future<SSHClient> genClient(
return SSHClient(
socket,
username: spi.user,
identities: await Computer.shared.start(loadIndentity, privateKey),
// Must use [compute] here, instead of [Computer.shared.start]
identities: await compute(loadIndentity, privateKey),
);
}