Closed Bug 291882 Opened 20 years ago Closed 20 years ago

Make nsXREDirProvider handle unknown CSIDL_LOCAL_APPDATA

Categories

(Toolkit :: Startup and Profile System, defect, P1)

x86
Windows 95
defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: darin.moz, Assigned: darin.moz)

Details

(Keywords: regression)

Attachments

(1 file)

Make nsXREDirProvider handle unknown CSIDL_LOCAL_APPDATA This may be something we need to worry about on older Windows systems. Use of CSIDL_LOCAL_APPDATA was introduced by the patch for bug 291033. This bug may cause Firefox not to start on some Windows systems.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.8beta2
I'm not sure this is a problem. Wouldn't the windows call just fail, and necko/fastload (the only users of this) can fallback to the profile directory anyway?
I guess this is why I figured that PROFILE_LOCAL_DIR could be null. hrm...
In case, the fallback is not implemented at the moment : Info for the required version can be found here : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/enums/csidl.asp CSIDL_APPDATA (0x001a) Version 4.71 CSIDL_LOCAL_APPDATA (0x001c) Version 5.0. And here is the page that document what system will have which version : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/versions.asp IE 5 required, but : "Internet Explorer 5 does not update the Shell, so version 5.0 of Shell32.dll will not be found on Windows NT, Windows 95, or Windows 98 systems. Version 5.0 of Shell32.dll will be distributed with Windows 2000 and Windows Me" And : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shgetspecialfolderlocation.asp says that SHGetSpecialFolderLocation comes from shell32.lib To be tested, but it sounds like 95/98/NT will be concerned even with IE 5 installed.
Also, note that not even CSIDL_APPDATA is supported on all our platforms. At least on original Win95, we use %WINDIR%\Mozilla. see http://lxr.mozilla.org/seamonkey/source/toolkit/xre/nsXREDirProvider.cpp#719 and/or http://lxr.mozilla.org/seamonkey/source/xpcom/io/nsAppFileLocationProvider.cpp#374
Yes, it is important that GetUserDataDirectory not fail. It should handle the failover. It currently does, but I'm not sure that failover from CSIDL_LOCAL_APPDATA to C:\Windows is better than failover from CSIDL_LOCAL_APPDATA to CSIDL_APPDATA. It would seem that there are some versions of Windows where the CSIDL_LOCAL_APPDATA location is not defined but CSIDL_APPDATA is, so in those cases it would probably be odd to store the Cache in C:\Windows.
(In reply to comment #5) > Yes, it is important that GetUserDataDirectory not fail. It should handle the > failover. It currently does, but I'm not sure that failover from > CSIDL_LOCAL_APPDATA to C:\Windows is better than failover from > CSIDL_LOCAL_APPDATA to CSIDL_APPDATA. It would seem that there are some > versions of Windows where the CSIDL_LOCAL_APPDATA location is not defined but > CSIDL_APPDATA is, so in those cases it would probably be odd to store the Cache > in C:\Windows. On Windows 9x IE stores its cache in C:\Windows\Temporary Internet Files. AFAIK Win 9x also has an APPDATA folder, not sure whether this is by default (or whether it is defined anywhere) or explicitly created by applications, but last time I used Win 9x (long time ago), I think it was C:\Windows\Application Data.
Attached patch v1 patchSplinter Review
This should do the trick.
Attachment #181937 - Flags: first-review?(benjamin)
> AFAIK Win 9x also has an APPDATA folder for some versions of "x"
Attachment #181937 - Flags: first-review?(benjamin) → first-review+
Comment on attachment 181937 [details] [diff] [review] v1 patch I'd like to see this included for Firefox 1.1a, as without it we may cause some problems for Win9x users.
Attachment #181937 - Flags: approval1.8b2?
Attachment #181937 - Flags: approval-aviary1.1a1?
Comment on attachment 181937 [details] [diff] [review] v1 patch a=asa
Attachment #181937 - Flags: approval1.8b2?
Attachment #181937 - Flags: approval1.8b2+
Attachment #181937 - Flags: approval-aviary1.1a1?
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
One note : in the implementation linked to this we carefully avoid using SHGetFolderPath and use SHGetSpecialFolderLocation instead to not have a dependance on SHFolder.dll that comes with system that have IE 5 or later (SHGetFolderPath is implemented in shell32.dll in W2000/Me and upward, software linked to SHFolder.dll will be transparently redirected). But SHFolder.dll is a redistributable that we can get here : http://www.microsoft.com/downloads/details.aspx?FamilyID=6ae02498-07e9-48f1-a5d6-dbfa18d37e0f&DisplayLang=en and by using that we'd be sure we get SHGetFolderPath with a minimum the 5.50.4027.300 level of implementation on any system from w95 upward.
I'd just rather not increase our download size with a redistributable DLL like this if it can be helped.
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: