Open Containing Folder doesn't work if the file doesn't exist




11 years ago
5 years ago


(Reporter: stevee, Unassigned)


Windows XP

Firefox Tracking Flags

(Not tracked)





11 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008010904 Minefield/3.0b3pre ID:2008010904

1. New profile, start firefox
2. Visit
3. Right click on the minefield logo, and choose Save As
4. Save the image somewhere.
5. Find the file on your HD and rename the image to something else
6. Tools > Downloads
7. Right click on the item for the logo you just saved, and choose Open Containing Folder

- You should be taken to the directory where you saved the image; even tho you renamed the image, the directory still exists, and so should be opened.

- Dialog thrown "The path C:\minefield-icon.png does not exist or is not a directory."
Just a datapoint; Mac's "Show in Finder" still works if you delete the selected file from under it.
Hrm, we already have code that would have handled this, I thought.

It seems like this is only a problem on WinXP. The following succeeds (i.e. doesn't throw) on XP, but results in a "Path does not exist or is not a directory" alert dialog.

var nsLocalFile = Components.Constructor(";1", "nsILocalFile", "initWithPath");
var f = new nsLocalFile("C:\\windows\\nosndofsdifjo.txt");

On Vista, this code snippet results in a window opened at C:\Users\Gavin (the CWD presumably) with the "Documents" folder selected.
I suppose we could check Exists() ourselves and skip directly to launch()ing the parent, but I think reveal() really should throw in this case... according to MSDN ShellExecute should fail if the path passed in points to a non-existent file, and our impl of ::Reveal looks like it would catch that. More investigation needed, I guess.


10 years ago
Product: Firefox → Toolkit

Comment 4

5 years ago
Still present in FireFox 26, and all previous releases.
You need to log in before you can comment on or make changes to this bug.