Closed Bug 1777851 Opened 3 years ago Closed 3 years ago

Dragging and dropping a link to a webpage with a colon in the title onto a folder creates an undeletable file

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

Firefox 102
defect

Tracking

()

VERIFIED DUPLICATE of bug 1774683

People

(Reporter: czm32613, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0

Steps to reproduce:

  1. Open a webpage that contains a colon in the title
  2. Drag and drop the link from the address bar to a system folder (mostly tested it with Desktop)

NOTE: I think this could also be a problem with other characters that cannot be a part of a file name as well as webpages with titles longer than file name character limit but I did not test that far.

Actual results:

A non-working file is created, with some pages the file cannot be moved or deleted by standard measures, system shows "Could not find this item" error.
Tip for whoever might be trying this: I was able to remove the undeletable files by archiving them with 7-zip and selecting the "Delete files after compression" checkbox.

EXAMPLES:

Deletable broken file:
All wiktionary pages with colon in the title:
https://en.wiktionary.org/wiki/Wiktionary:Categories

Undeletable broken file:
Any reddit post opened in a new tab contains a colon in the page title:
https://www.reddit.com/r/pics/comments/haucpf/ive_found_a_few_funny_memories_during_lockdown/

Expected results:

Firefox should create a standard system shortcut as is the case with most webpages.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Copy & Paste and Drag & Drop' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Copy & Paste and Drag & Drop
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE

Please reopen, this was reported for Firefox, it has nothing to do with Thunderbird.

Flags: needinfo?(alice0775)

Oops the bug# is wrong, sorry Bug 1774683 is correct.

Status: RESOLVED → VERIFIED
Flags: needinfo?(alice0775)

If a file (contains trailing space / dot+space) cannot be deleted normally in explorer/cmd - you can do so by deleting using Long UNC path in terminal:
DEL /A "\\?\FULL_PATH\filename"

#Fail:
dir "C:\stuff\Canadian Forces Intelligence Command Statement "
File Not Found
#Success:
dir \\?\"C:\stuff\Canadian Forces Intelligence Command Statement "
2022-07-03  14:07     0 Canadian Forces Intelligence Command Statement`
  1. Open folder in explorer, then hold SHIFT and right-click on file - choose Copy as Path
  2. Open terminal/cmd and type:
    DEL /a \\?\ and paste FULL_PATH from clipboard.
You need to log in before you can comment on or make changes to this bug.