You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitExtensions crashes when right click a file with a strange path in the Diff section.
Expected behaviour
Don't crash and let make actions over that committed file.
Steps to reproduce
Right click on a file with a path like: src/my-project/c:\temp\somefile.txt in the Diff section
Error Details
System.NotSupportedException: The given path's format is not supported.
at System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks(String fullPath)
at System.Security.Permissions.FileIOPermission.QuickDemand(FileIOPermissionAccess access, String fullPath, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.FileInfo.Init(String fileName, Boolean checkHost)
at System.IO.FileInfo..ctor(String fileName)
at GitUI.CommandsDialogs.BrowseDialog.FormBrowseUtil.FileOrParentDirectoryExists(String path)
at GitUI.CommandsDialogs.RevisionDiffControl.UpdateStatusOfMenuItems()
at GitUI.CommandsDialogs.RevisionDiffControl.DiffContextMenu_Opening(Object sender, CancelEventArgs e)
at System.ComponentModel.CancelEventHandler.Invoke(Object sender, CancelEventArgs e)
at System.Windows.Forms.ToolStripDropDown.OnOpening(CancelEventArgs e)
at System.Windows.Forms.ToolStripDropDown.SetVisibleCore(Boolean visible)
at System.Windows.Forms.ContextMenuStrip.SetVisibleCore(Boolean visible)
at System.Windows.Forms.ToolStripDropDown.Show(Control control, Point position)
at System.Windows.Forms.ContextMenuStrip.ShowInternal(Control source, Point location, Boolean isKeyboardActivated)
at System.Windows.Forms.Control.WmContextMenu(Message& m, Control sourceControl)
at System.Windows.Forms.Control.WmContextMenu(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at GitUI.UserControls.ExListView.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Additional information
A file is in a branch with a path like: src/my-project/c:\temp\somefile.txt
when I right click the file in the Diff tab it crashes saying "The given path's format is not supported."
I also tried to reset the file to First state (master) and it does nothing.
Actions are disabled if there are issues like this with illegal paths, but not all actions are disabled like that. There are a lot of code for such checks already, I rather not implement a check also in this cornercase.
Current behaviour
GitExtensions crashes when right click a file with a strange path in the Diff section.
Expected behaviour
Don't crash and let make actions over that committed file.
Steps to reproduce
Right click on a file with a path like: src/my-project/c:\temp\somefile.txt in the Diff section
Error Details
Additional information
A file is in a branch with a path like: src/my-project/c:\temp\somefile.txt
when I right click the file in the Diff tab it crashes saying "The given path's format is not supported."
Environment
The text was updated successfully, but these errors were encountered: