Closed Bug 1335111 Opened 7 years ago Closed 1 year ago

Change .url file extension to lower case

Categories

(Core :: Widget: Win32, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
firefox51 --- wontfix
firefox52 --- wontfix
firefox53 --- wontfix
firefox54 --- wontfix
firefox110 --- fixed

People

(Reporter: bugzilla, Assigned: woot903, Mentored)

Details

(Keywords: good-first-bug)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

Drag the link to the current page from the icon left of the address into an Explorer window.


Actual results:

A web shortcut file named after the page title with the file name extension .URL (upper case) was created.


Expected results:

The extension should be .url (lower case). Nobody wants all-caps file names anymore since DOS was replaced by Windows some 20 years ago. All other file names have lower case extensions, it's just Firefox that does that.
Severity: normal → trivial
Should be here, according to a quick search in the source code:

https://dxr.mozilla.org/mozilla-central/source/widget/windows/nsDataObj.cpp
6 occurrences in lines 1058 to 1105
GetFileDescriptorInternetShortcutA()
GetFileDescriptorInternetShortcutW()
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID 	20170130030205

The issue is reproducible on the latest Firefox release (51.0.1) and on the latest Nightly (54.0a1).
Severity: trivial → enhancement
Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
Mass wontfix for bugs affecting firefox 52.
Priority: -- → P5

Can I help by creating a patch for this? Would you accept that and is there related test coverage for this?

Go for it.

Assignee: nobody → _+bugzilla
Status: NEW → ASSIGNED
Component: File Handling → Widget: Win32
Product: Firefox → Core
Version: 51 Branch → unspecified

Here you go.

Disclaimer: I have just changed that single file. I am way unable to set up a Firefox build environment here so I cannot test a thing of what I'm doing. But if the source code is cleanly organised, this should be working.

Thanks. Please read this document for your patch to be reviewed and merged.
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/How_to_Submit_a_Patch

I'm sorry I'm unable to build the source code. Looks like your build script can't find a C compiler. I followed all instructions, VS 2019 with C++ support is there. Unfortunately I don't have much time to tinker with Firefox' build system. And I'll have to delete those 6 GB on my disk again. So please consider assigning this to someone who can do it in 5 minutes. It already took me hours.

Assignee: _+bugzilla → nobody
Status: ASSIGNED → NEW
Severity: normal → S3

This also affects Firefox 107.

Firefox is the only browser that creates shortcut files with uppercase file extension.

Mentor: rkraesig

I would like to take this on and complete/verify these changes.

Flags: needinfo?(rkraesig)

Unfortunately, this is a good first bug, not a good second bug.

 

 

Sorry. Couldn't resist. :) Thanks for stepping up! Bug 1805885 does tell me you've gotten up and running, so I'll skip the link to the Getting Started docs.

If you've got any specific questions about this bug, fire away -- either here or in the Windows Development channel (#windev) on Matrix. Otherwise, just set me as the reviewer for the patch.

Flags: needinfo?(rkraesig)

I am new to Open Source. I would love to take this as my first bug. Can I be assigned this bug?

You will be automatically assigned to this bug once you've submitted a patch to it. Make sure to follow the commit message format as described here.

Assignee: nobody → ranjanmangla1
Assignee: ranjanmangla1 → nobody
Assignee: nobody → woot903
Status: NEW → ASSIGNED

Haha good one :rkraesig. These easier bugs are a good introduction to the codebase.

I have attached a patch ready for you to review with code changes based on the ones Yves Goergen submitted earlier.

Flags: needinfo?(rkraesig)
Flags: needinfo?(rkraesig)

Great job. I already did that 3 years ago (see above). Hope it finally gets merged now.

Pushed by rkraesig@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/60fd0da13326
Changed shortcut link extensions to '.url' instead of '.URL'. r=rkraesig
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch

Thank you very much! This could have been accepted and fixed 3 years ago. Oh well.

(In reply to Yves Goergen from comment #20)

Thank you very much! This could have been accepted and fixed 3 years ago. Oh well.

There was no properly formatted patch to accept. This is the purpose of a "good-first-bug", to get contributors set up to effectively contribute to the code base. Your contribution was appreciated, but it wasn't in a form that could be accepted and landed as-is (see comment 8).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: