opt: Shares

This commit is contained in:
lollipopkit
2023-10-25 22:18:37 -06:00
parent 02be466954
commit 6579190ae4
14 changed files with 72 additions and 53 deletions

View File

@@ -308,14 +308,13 @@ class ServerProvider extends ChangeNotifier {
try {
Loggers.app.warning('Using SFTP to write script to ${spi.name}');
file.writeAsString(ShellFunc.allScript);
final sftp = Pros.sftp;
final completer = Completer();
final reqId = sftp.add(
final reqId = Pros.sftp.add(
SftpReq(spi, installShellPath, localPath, SftpReqType.upload),
completer: completer,
);
await completer.future;
final err = sftp.get(reqId)?.error;
final err = Pros.sftp.get(reqId)?.error;
if (err != null) {
throw err;
}