From b9da8df8fee5a84195ba3ac250aa0c40021c24bf Mon Sep 17 00:00:00 2001 From: MaxXor Date: Sat, 11 Feb 2023 18:07:37 +0100 Subject: [PATCH] Open remote shell from file manager on correct drive (Fixes #822) --- Quasar.Server/Forms/FrmFileManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Quasar.Server/Forms/FrmFileManager.cs b/Quasar.Server/Forms/FrmFileManager.cs index 649e42f7..5570b2e1 100644 --- a/Quasar.Server/Forms/FrmFileManager.cs +++ b/Quasar.Server/Forms/FrmFileManager.cs @@ -428,7 +428,8 @@ private void openDirectoryToolStripMenuItem_Click(object sender, EventArgs e) FrmRemoteShell frmRs = FrmRemoteShell.CreateNewOrGetExisting(_connectClient); frmRs.Show(); frmRs.Focus(); - frmRs.RemoteShellHandler.SendCommand($"cd \"{path}\""); + var driveLetter = Path.GetPathRoot(path); + frmRs.RemoteShellHandler.SendCommand($"{driveLetter.Remove(driveLetter.Length - 1)} && cd \"{path}\""); } private void btnOpenDLFolder_Click(object sender, EventArgs e)