Closed Bug 211894 Opened 23 years ago Closed 22 years ago

"Show File Location" starts (launches) an executable of the same name (in nsILocalFile::Reveal)

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: jan, Assigned: dougt)

References

Details

(Keywords: fixed-aviary1.0.1, fixed1.7.6, Whiteboard: [sg:fix])

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 When clicking "Show File Location" on a file thats downloaded to X:\test\, a file X:\test.exe is executed instead of showing the explorer window of X:\test\. Possible fix: Replace "LONG r = (LONG) ::ShellExecute( NULL, "open", path.get(), NULL, NULL, SW_SHOWNORMAL);" by "LONG r = (LONG) ::ShellExecute( NULL, "explore", path.get(), NULL, NULL, SW_SHOWNORMAL);" Reproducible: Always Steps to Reproduce: 1. Download a file into a folder named "X:\test\" with a file "X:\test.exe" existing 2. Click on "Show File Location" Actual Results: X:\text.exe is executed. Expected Results: Show the explorer window of "X:\test\"
Sounds like a bug in nsLocalFileWin::Launch()
Assignee: blaker → dougt
Status: UNCONFIRMED → NEW
Component: Download Manager → XPCOM
Ever confirmed: true
QA Contact: petersen → scc
btw... for some reason the fix in comment 0 isn't working. if I change that to "explore", ShellExecute returns 31.
Well, that was a suggestion, i did not test it. :) 31 is SE_ERR_NOASSOC: "There is no application associated with the given filename extension."
Severity: normal → major
Maybe it's time to re-visit my patch for bug 156422. Reading through that, you'll find that it's basically the same as what Windows does when you select 'Explore' from a folder's context menu.
The issue is that LONG r = (LONG) ::ShellExecute( NULL, "open", path.get(), NULL, NULL, SW_SHOWNORMAL); is insecure and needs Dean's patch to fix it.
Depends on: 156422
*** Bug 239640 has been marked as a duplicate of this bug. ***
Summary: "Show File Location" starts an executable of the same name → "Show File Location" starts an executable of the same name (in nsILocalFile::Reveal)
Bug 156422 was checked in and also did fix this bug. I just verified with cvs builds from before and after the fix. Any reason for not resolving this bug here?
marking so
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Summary: "Show File Location" starts an executable of the same name (in nsILocalFile::Reveal) → "Show File Location" starts (launches) an executable of the same name (in nsILocalFile::Reveal)
*** Bug 283008 has been marked as a duplicate of this bug. ***
Whiteboard: [sg:fix]
*** Bug 290280 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.