devlinx9 / muon-ssh

Graphical SFTP client and terminal emulator (SSH) with helpful utilities
GNU General Public License v3.0
172 stars 26 forks source link

Cannot open file on local machine through file browser #75

Open b0unc3r opened 2 years ago

b0unc3r commented 2 years ago

Describe the bug In the File Browser tab, when you right click on a file on the local machine side and select Open it doesn't do anything. The file is not opened.

To Reproduce Steps to reproduce the behavior:

  1. Connect to a server.
  2. Click on the File Browser tab.
  3. Right Click on a file on the local machine side.
  4. Click Open.

Screenshots Screenshot from 2022-03-03 16-35-17

liunn123 commented 2 years ago

本地文件打不开.在这里解决muon.app.ui.components.session.files.local.LocalMenuHandler.java 173 private void open() { FileInfo[] files = folderView.getSelectedFiles(); if (files.length == 1) { FileInfo file = files[0]; if (file.getType() == FileType.FileLink || file.getType() == FileType.File) { try { Desktop.getDesktop().open(new File(file.getPath())); } catch (IOException e) {

     e.printStackTrace();

     System.out.println("打开文件失败");

 }

        }
    }
}
liunn123 commented 2 years ago

他原来里面是空的,没有执行任何方法,我添加了try { Desktop.getDesktop().open(new File(file.getPath())); } catch (IOException e) {

 e.printStackTrace();

 System.out.println("打开文件失败");

}

让它执行打开文件的操作,

liunn123 commented 2 years ago

image