Closed Bug 228977 Opened 21 years ago Closed 20 years ago

Firefox gets wrong desktop folder for downloading

Categories

(Toolkit :: Downloads API, defect, P4)

x86
Windows 2000
defect

Tracking

()

VERIFIED FIXED
mozilla1.7.4

People

(Reporter: ted, Assigned: bugs)

References

Details

(Keywords: fixed-aviary1.0)

Attachments

(1 file)

In three places in the Firebird downloading code, it looks for the Desktop
folder as a default download location.  For pathological cases (such as my work
machine), the value obtained will not be correct.  Instead of using the key
"DeskV", which is the "virtual folder at the root of the namespace", you need to
use "DeskP", which is the "file sys dir which physically stores objects on
desktop".  A subtle difference, but apparently it makes a difference on my machine.

Places this needs to be changed:
http://lxr.mozilla.org/mozilla/source/browser/base/content/contentAreaUtils.js#340
http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/downloads/content/pref-downloads.js#302
http://lxr.mozilla.org/mozilla/source/toolkit/mozapps/downloads/src/nsHelperAppDlg.js.in#145

At least that's all I found through LXR.
QA Contact: mconnor
Easy. 0.9
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Firebird0.9
*** Bug 231494 has been marked as a duplicate of this bug. ***
On my Windows computer, I do not use the default Desktop folder (Documents and
settings\Profile\Desktop) but FireBird defaults to that one instead of my real
Desktop. What I ended up doing was setting security permissions on that folder
so I get an error message when I try to download a file, just to ensure that I
am not saving to the wrong Desktop folder.
I get the same results as comment #3.
My desktop is set to C:\Desktop (for ease of backup)
Firefox always detects my default desktop location.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Summary: Firebird gets wrong desktop folder for downloading → Firefox gets wrong desktop folder for downloading
*** Bug 234694 has been marked as a duplicate of this bug. ***
On my russian Windows2000 box (where "Desktop" folder is translated into
russian, i.e. it's in cyrillic) Firefox created the alternate desktop folder
with the same name (but using unicode characters, not windows-1251, as I
understood).
Just as an example:

One of my sites is using firefox with the redirected My Documents folder as part
of the policy settings.

Saving a file to the default folder (Desktop) does not save it to the redirected
folder that is actually being used to store desktop items
(\\myserver\myshare\username\desktop in this case), but instead saves it to
C:\Documaents and Settings\username\desktop.

The biggest problem this presents is the C:\ drive is also locked out to the
users to be able to access it from explorer.  In otherwords, they can't access
the file once it has been downloaded!  This bug should be blocking 0.9.
Flags: blocking0.9?
Not going to block 0.9 for this. We'll see if we can get to it for beta. 
Flags: blocking0.9? → blocking0.9-
Target Milestone: Firefox0.9 → Firefox1.0beta
Flags: blocking1.0+
Attached patch Untested patchSplinter Review
I can't easily build on a windows machine right now, but this patch changes all
three occurances I found in the code.  If someone could build a windows binary
with this patch, I can test it at work.
Priority: P2 → P4
Quite annoying that downloads seem to 'disappear' by default, because they're
being saved to the wrong folder. I wonder if it would be worth prompting the
user for a download location the very first time...
I just tested the patch, it works perfectly and immediately for me with WinXP
Pro with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040531
Firefox/0.8.0+
Attachment #148884 - Flags: review?(mconnor)
With Firefox 0.9 and Windows 2000, when you set the default download to Desktop,
it creates a new Desktop folder in \Documents and Settings\username\ if it does
not find one there. And if, for reasons of backup, you have put your Desktop
folder into My Documents or somewhere else different, this results in another
Desktop folder.

If you point Firefox at the proper location of your Desktop, then it does indeed
find it.

What it really needs to do, if you leave the default setting to Desktop, is to
say "Folder not fount. Do you want to create it?" or something like that to flag
a warning.

But many thanks for Firefox which is great.

Mark Ellse
There's no need for a prompt... this patch solves the problem (i.e. the desktop
is always found regardless of location).
This bug may me more serious than I realized.  Apparently, it affects all
Windows XP Home Edition users.I forgot about them having their desktop in a
different location than on Pro.

Apparently, it will download it to %userprofile%\Desktop even thought the XP
Home Edition default is %userprofile%\data\Desktop

http://forums.mozillazine.org/viewtopic.php?t=86754
Comment #14, the default desktop location for XP Home & Pro is the same,
%USERPROFILE%\Desktop, which also happens to be the location of the desktop on
W2K.  So this does not affect most normal users.  See Table 5-20 on the
following link, which applies to XP Home and XP Pro:
http://www.microsoft.com/mspress/books/sampchap/6232a.asp
Comment on attachment 148884 [details] [diff] [review]
Untested patch

looks sane enough for me.  Someone affected by this bug should verify that it
works after being checked in (hopefully later today)
Attachment #148884 - Flags: review?(mconnor) → review+
*** Bug 249200 has been marked as a duplicate of this bug. ***
*** Bug 249535 has been marked as a duplicate of this bug. ***
Blocks: 245901
*** Bug 245901 has been marked as a duplicate of this bug. ***
checked in,branch and trunk.

Someone who is affected by this issue, please verify the fix in tomorrow's
builds (either trunk or branch is fine)
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040706
Firefox/0.8.0+

Fixed on trunk.  Verifying.
Status: RESOLVED → VERIFIED
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040706
Firefox/0.9.0+

Confirming Fixed on Aviary Branch.
*** Bug 250118 has been marked as a duplicate of this bug. ***
*** Bug 251040 has been marked as a duplicate of this bug. ***
*** Bug 252516 has been marked as a duplicate of this bug. ***
Keywords: fixed-aviary1.0
*** Bug 256701 has been marked as a duplicate of this bug. ***
*** Bug 265192 has been marked as a duplicate of this bug. ***
Since Bug 246618 was fixed, similar behaviour (with an identical fix) has
appeared in the Download windows, whereby if a user chooses a non-default
Windows desktop folder, the default (C:\Documents and Settings\Username\Desktop)
is shown by Firefox instead.

Should this be a new bug or should this be reopened? In either case, the fix is
identical and works, and I'll attach a patch where appropriate, once someone
lets me know.
(In reply to comment #28)
> Should this be a new bug or should this be reopened?

Probably a new one.  You're certainly not getting much response here. ;-)
*** Bug 280150 has been marked as a duplicate of this bug. ***
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: