рефакторинг. Исправлен баг. если прервать локальную задачу, не удалялся файл interrupt.
This commit is contained in:
2024-01-08 20:37:16 +03:00
parent 5baf2154e2
commit fce61bf55a
26 changed files with 281 additions and 582 deletions

View File

@@ -4,7 +4,7 @@ import Common.Global;
import Common.UI.UI;
import Common.UI.Windows.Dialog.Dialog;
import GlobalData.RemoteFile.RemoteFile;
import files.ConnectionPass;
import Visual_DVM_2021.Passes.SSH.ConnectionPass;
import com.jcraft.jsch.ChannelSftp.LsEntry;
import javax.swing.tree.DefaultMutableTreeNode;
@@ -28,7 +28,7 @@ public class RemoteFileChooser extends Dialog<String, RemoteFileChooserFields> {
session = (ConnectionPass) params[0];
target_is_directory = (boolean) params[1];
try {
Refresh(session.getSftpChannel().pwd());
Refresh(session.user.connection.sftpChannel.pwd());
} catch (Exception ex) {
Global.Log.PrintException(ex);
onCancel(); //закрываем окно.
@@ -45,7 +45,7 @@ public class RemoteFileChooser extends Dialog<String, RemoteFileChooserFields> {
root_file = new RemoteFile(path, true);
root = new DefaultMutableTreeNode(root_file);
//-------------------------------------------------------
Vector<LsEntry> files = session.getSftpChannel().ls(path);
Vector<LsEntry> files = session.user.connection.sftpChannel.ls(path);
Vector<RemoteFile> directories_ = new Vector<>();
Vector<RemoteFile> files_ = new Vector<>();
//отсортировать по принадлежности.
@@ -74,7 +74,7 @@ public class RemoteFileChooser extends Dialog<String, RemoteFileChooserFields> {
}
public void goHome() {
try {
Refresh(session.getSftpChannel().getHome());
Refresh(session.user.connection.sftpChannel.getHome());
} catch (Exception ex) {
Global.Log.PrintException(ex);
onCancel(); //закрываем окно.