예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
파일: SettingForm.cs 프로젝트: apaka/dokan
        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;
        }