Skip to content

Crashes when drag drop object has certain path pattern #19015

Closed
@8LWXpg

Description

@8LWXpg

Windows Terminal version

1.22.11141.0

Windows build number

10.0.26100.0

Other Software

Wrote a basic Winforms app that performs file/folder drag drop

private void DragSource_MouseMove(object sender, MouseEventArgs e)
{
	if (e.Button != MouseButtons.Left)
	{
		return;
	}

	var dataObject = new DataObject(DataFormats.FileDrop, _path);
	DragDropEffects result = DoDragDrop(dataObject, Globals.ArgParser.Move ? DragDropEffects.Move : DragDropEffects.Copy);
	if (result is DragDropEffects.Move or DragDropEffects.Copy)
	{
		Application.Exit();
	}
}

https://github.com/8LWXpg/dwag/blob/02f21dca322850c3fb2786f0e07ed2c630dcab4f/dwag/DrageSourceForm.cs#L65-L78

Steps to reproduce

Certain path pattern cause wt to crash

  • Forward slash: E:/test.txt
  • Relative path: E:\test\..\test.txt, ., .\test.txt
2025-06-08.154321_h264.mp4

Expected Behavior

Handles path properly.

Actual Behavior

Crashes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Help WantedWe encourage anyone to jump in on these.Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-TerminalThe new Windows Terminal.Severity-CrashCrashes are real bad news.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions