private void Unmount() { Debug.WriteLine(string.Format("SSHFS Trying unmount : {0}", opt.DriveLetter)); if (DokanNet.DokanUnmount(opt.DriveLetter) < 0) { // If DokanUmount failed, call sshfs.Unmount to disconnect. ;// sshfs.Unmount(null); } // This should be called from Dokan, but not called. // Call here explicitly. sshfs.Unmount(null); unmount.Visible = false; mount.Visible = true; }
private void Unmount() { if (opt != null && sshfs != null) { Debug.WriteLine(string.Format("SSHFS Trying unmount : {0}", mountPoint)); try { Dokan.RemoveMountPoint(mountPoint); Debug.WriteLine("DokanReveMountPoint success\n"); } catch (DokanException ex) { Debug.WriteLine("DokanRemoveMountPoint failed: " + ex.Message + "\n"); } // This should be called from Dokan, but not called. // Call here explicitly. sshfs.Unmount(null); } unmount.Visible = false; mount.Visible = true; }
private void Unmount() { if (opt != null && sshfs != null) { Debug.WriteLine(string.Format("SSHFS Trying unmount : {0}", opt.MountPoint)); if (DokanNet.DokanRemoveMountPoint(opt.MountPoint) < 0) { Debug.WriteLine("DokanReveMountPoint failed\n"); // If DokanUmount failed, call sshfs.Unmount to disconnect. ;// sshfs.Unmount(null); } else { Debug.WriteLine("DokanReveMountPoint success\n"); } // This should be called from Dokan, but not called. // Call here explicitly. sshfs.Unmount(null); } unmount.Visible = false; mount.Visible = true; }