Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if remote folder and local folder are set #210

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,40 @@ public void onLoad() {
return;
}
init.set(true);
SshFileBrowserView left = new SshFileBrowserView(this, null, PanelOrientation.Left);
//chck if remote folder setted and use it
String TargetSSHDir = null;

if (info.getRemoteFolder() != null && !info.getRemoteFolder().isEmpty()){
TargetSSHDir = info.getRemoteFolder();
}




SshFileBrowserView left = new SshFileBrowserView(this, TargetSSHDir, PanelOrientation.Left);
this.leftTabs.addTab(left.getTabTitle(), left);

LocalFileBrowserView right = new LocalFileBrowserView(this, System.getProperty("user.home"),



//Check if exist dir, if exist use it
String TargetDir = null;
if (info.getLocalFolder() != null && !info.getLocalFolder().isEmpty() && new File(info.getLocalFolder()).exists()){
TargetDir = info.getLocalFolder();
}else{

TargetDir = System.getProperty("user.home");
}
LocalFileBrowserView right = new LocalFileBrowserView(this,TargetDir,
PanelOrientation.Right);





this.rightTabs.addTab(right.getTabTitle(), right);
}


@Override
public String getIcon() {
return FontAwesomeContants.FA_FOLDER;
Expand Down