Closed Bug 23289 Opened 25 years ago Closed 25 years ago

GetFolder: Objects returned are inconsistent with delimiter in path names

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect, P1)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jimmykenlee, Assigned: dougt)

References

Details

Attachments

(1 file)

Build: 2000-01-06-09-M13(WIN), 2000-01-06-11-M13(MAC), 2000-01-06-13-M13(LINUX) 1. From http://jimbob/trigger2.html, trigger http://jimbob/jars/f_getfolder_paths.xpi function showPath(targetFolder) { f = getFolder(targetFolder); logComment("targetFolder = " + targetFolder); logComment("getFolder returns = " + f); } startInstall("Functional: f_getfolder_paths", "f_getfolder_paths", "1.1.1.1", 0); showPath("Chrome"); showPath("Communicator"); showPath("Components"); showPath("Current User"); showPath("file:///"); showPath("OS Drive"); showPath("Plugins"); showPath("Preferences"); showPath("Program"); showPath("Temporary"); showPath("User Pick"); showPath("Unknown"); showPath("Windows"); showPath("Win System"); showPath("Unix Lib"); showPath("Unix Local"); showPath("Mac Apple Menu"); showPath("Mac Control Panel"); showPath("Mac Desktop"); showPath("Mac Documents"); showPath("Mac Extension"); showPath("Mac Fonts"); showPath("Mac Preferences"); showPath("Mac Shutdown"); showPath("Mac Startup"); showPath("Mac System"); showPath("Mac Trash"); if (0 == getLastError()) finalizeInstall(); else abortInstall(); RESULT: That paths returned differ depending on what target folder is used. Also, when an erroneous target folder is used "Unknown", a "valid" path is unexpectedly returned. According to the docs on devedge, the target folder "file:///" is only valid when a subdirectory is passed, so please note that it is not used in this form in this test. For Windows NT, the Install.log shows: ------------------------------------------------------------------------------- http://jimbob/jars/f_getfolder_paths.xpi -- 01/06/2000 15:18:47 ------------------------------------------------------------------------------- Functional: f_getfolder_paths ----------------------------- ** targetFolder = Chrome ** getFolder returns = C:\Program Files\moz106\chrome ** targetFolder = Communicator ** getFolder returns = C:\Program Files\moz106\ ** targetFolder = Components ** getFolder returns = C:\Program Files\moz106\components ** targetFolder = Current User ** getFolder returns = C:\Program Files\Users50\jimmy ** targetFolder = file:/// ** getFolder returns = c:\Program Files\moz106\file: ** targetFolder = OS Drive ** getFolder returns = C:\ ** targetFolder = Plugins ** getFolder returns = C:\Program Files\moz106\plugins ** targetFolder = Preferences ** getFolder returns = C:\Program Files\Users50\jimmy ** targetFolder = Program ** getFolder returns = C:\Program Files\moz106\ ** targetFolder = Temporary ** getFolder returns = C:\TEMP\ ** targetFolder = User Pick ** getFolder returns = c:\Program Files\moz106\User Pick ** targetFolder = Unknown ** getFolder returns = c:\Program Files\moz106\Unknown ** targetFolder = Windows ** getFolder returns = C:\WINNT\ ** targetFolder = Win System ** getFolder returns = C:\WINNT\SYSTEM32\ ** targetFolder = Unix Lib ** getFolder returns = ** targetFolder = Unix Local ** getFolder returns = ** targetFolder = Mac Apple Menu ** getFolder returns = ** targetFolder = Mac Control Panel ** getFolder returns = ** targetFolder = Mac Desktop ** getFolder returns = ** targetFolder = Mac Documents ** getFolder returns = ** targetFolder = Mac Extension ** getFolder returns = ** targetFolder = Mac Fonts ** getFolder returns = ** targetFolder = Mac Preferences ** getFolder returns = ** targetFolder = Mac Shutdown ** getFolder returns = ** targetFolder = Mac Startup ** getFolder returns = ** targetFolder = Mac System ** getFolder returns = ** targetFolder = Mac Trash ** getFolder returns = Install completed successfully Finished Installation 01/06/2000 15:18:47 For Windows 98, the Install.log shows: ------------------------------------------------------------------------------- http://jimbob/jars/f_getfolder_paths.xpi -- 01/06/2000 15:12:05 ------------------------------------------------------------------------------- Functional: f_getfolder_paths ----------------------------- ** targetFolder = Chrome ** getFolder returns = C:\PROGRAM FILES\MOZ106\chrome ** targetFolder = Communicator ** getFolder returns = C:\PROGRAM FILES\MOZ106\ ** targetFolder = Components ** getFolder returns = C:\PROGRAM FILES\MOZ106\components ** targetFolder = Current User ** getFolder returns = C:\Users50\Jimmy ** targetFolder = file:/// ** getFolder returns = C:\Program Files\moz106\file:\\\ ** targetFolder = OS Drive ** getFolder returns = C:\ ** targetFolder = Plugins ** getFolder returns = C:\PROGRAM FILES\MOZ106\plugins ** targetFolder = Preferences ** getFolder returns = C:\Users50\Jimmy ** targetFolder = Program ** getFolder returns = C:\PROGRAM FILES\MOZ106\ ** targetFolder = Temporary ** getFolder returns = C:\WIN98\TEMP\ ** targetFolder = User Pick ** getFolder returns = C:\Program Files\moz106\User Pick ** targetFolder = Unknown ** getFolder returns = C:\Program Files\moz106\Unknown ** targetFolder = Windows ** getFolder returns = C:\WIN98\ ** targetFolder = Win System ** getFolder returns = C:\WIN98\SYSTEM\ ** targetFolder = Unix Lib ** getFolder returns = ** targetFolder = Unix Local ** getFolder returns = ** targetFolder = Mac Apple Menu ** getFolder returns = ** targetFolder = Mac Control Panel ** getFolder returns = ** targetFolder = Mac Desktop ** getFolder returns = ** targetFolder = Mac Documents ** getFolder returns = ** targetFolder = Mac Extension ** getFolder returns = ** targetFolder = Mac Fonts ** getFolder returns = ** targetFolder = Mac Preferences ** getFolder returns = ** targetFolder = Mac Shutdown ** getFolder returns = ** targetFolder = Mac Startup ** getFolder returns = ** targetFolder = Mac System ** getFolder returns = ** targetFolder = Mac Trash ** getFolder returns = Install completed successfully Finished Installation 01/06/2000 15:12:05 For Linux, the Install.log shows: ------------------------------------------------------------------------------- http://jimbob/jars/f_getfolder_paths.xpi -- 01/06/2000 5:09:43 ------------------------------------------------------------------------------- Functional: f_getfolder_paths ----------------------------- ** targetFolder = Chrome ** getFolder returns = /u/jimmylee/linux60/jan_06/package/chrome ** targetFolder = Communicator ** getFolder returns = /u/jimmylee/linux60/jan_06/package ** targetFolder = Components ** getFolder returns = /u/jimmylee/linux60/jan_06/package/components ** targetFolder = Current User ** getFolder returns = /u/jimmylee/.mozilla/mozProfile-1 ** targetFolder = file:/// ** getFolder returns = /u/jimmylee/linux60/jan_06/package/file:/// ** targetFolder = OS Drive ** getFolder returns = / ** targetFolder = Plugins ** getFolder returns = /u/jimmylee/linux60/jan_06/package/plugins ** targetFolder = Preferences ** getFolder returns = /u/jimmylee/.mozilla/mozProfile-1 ** targetFolder = Program ** getFolder returns = /u/jimmylee/linux60/jan_06/package ** targetFolder = Temporary ** getFolder returns = /tmp/ ** targetFolder = User Pick ** getFolder returns = /u/jimmylee/linux60/jan_06/package/User Pick ** targetFolder = Unknown ** getFolder returns = /u/jimmylee/linux60/jan_06/package/Unknown ** targetFolder = Windows ** getFolder returns = ** targetFolder = Win System ** getFolder returns = ** targetFolder = Unix Lib ** getFolder returns = /usr/local/lib/netscape/ ** targetFolder = Unix Local ** getFolder returns = /usr/local/netscape/ ** targetFolder = Mac Apple Menu ** getFolder returns = ** targetFolder = Mac Control Panel ** getFolder returns = ** targetFolder = Mac Desktop ** getFolder returns = ** targetFolder = Mac Documents ** getFolder returns = ** targetFolder = Mac Extension ** getFolder returns = ** targetFolder = Mac Fonts ** getFolder returns = ** targetFolder = Mac Preferences ** getFolder returns = ** targetFolder = Mac Shutdown ** getFolder returns = ** targetFolder = Mac Startup ** getFolder returns = ** targetFolder = Mac System ** getFolder returns = ** targetFolder = Mac Trash ** getFolder returns = Install completed successfully Finished Installation 01/06/2000 15:09:43 For Macintosh, the Install.log shows: ------------------------------------------------------------------------------- http://jimbob/jars/f_getfolder_paths.xpi -- 01/06/2000 5:33:27 ------------------------------------------------------------------------------- Functional: f_getfolder_paths ----------------------------- ** targetFolder = Chrome ** getFolder returns = Webbies:moz106:mozilla-mac-M13:Chrome: ** targetFolder = Communicator ** getFolder returns = Webbies:moz106:mozilla-mac-M13: ** targetFolder = Components ** getFolder returns = Webbies:moz106:mozilla-mac-M13:Components: ** targetFolder = Current User ** getFolder returns = Webbies:Documents:Mozilla:Users50:Jimmy-1: ** targetFolder = file:/// ** getFolder returns = ** targetFolder = OS Drive ** getFolder returns = Webbies: ** targetFolder = Plugins ** getFolder returns = Webbies:moz106:mozilla-mac-M13:Plugins: ** targetFolder = Preferences ** getFolder returns = Webbies:Documents:Mozilla:Users50:Jimmy-1: ** targetFolder = Program ** getFolder returns = Webbies:moz106:mozilla-mac-M13: ** targetFolder = Temporary ** getFolder returns = Webbies:Temporary Items: ** targetFolder = User Pick ** getFolder returns = Webbies:moz106:mozilla-mac-M13:User Pick ** targetFolder = Unknown ** getFolder returns = Webbies:moz106:mozilla-mac-M13:Unknown ** targetFolder = Windows ** getFolder returns = Webbies:moz106:mozilla-mac-M13: ** targetFolder = Win System ** getFolder returns = Webbies:moz106:mozilla-mac-M13: ** targetFolder = Unix Lib ** getFolder returns = Webbies:moz106:mozilla-mac-M13: ** targetFolder = Unix Local ** getFolder returns = Webbies:moz106:mozilla-mac-M13: ** targetFolder = Mac Apple Menu ** getFolder returns = Webbies:System Folder:Apple Menu Items: ** targetFolder = Mac Control Panel ** getFolder returns = Webbies:System Folder:Control Panels: ** targetFolder = Mac Desktop ** getFolder returns = Webbies:Desktop Folder: ** targetFolder = Mac Documents ** getFolder returns = Webbies:Documents: ** targetFolder = Mac Extension ** getFolder returns = Webbies:System Folder:Extensions: ** targetFolder = Mac Fonts ** getFolder returns = Webbies:System Folder:Fonts: ** targetFolder = Mac Preferences ** getFolder returns = Webbies:System Folder:Preferences: ** targetFolder = Mac Shutdown ** getFolder returns = Webbies:System Folder:Shutdown Items: ** targetFolder = Mac Startup ** getFolder returns = Webbies:System Folder:Startup Items: ** targetFolder = Mac System ** getFolder returns = Webbies:System Folder: ** targetFolder = Mac Trash ** getFolder returns = Webbies:Trash: Install completed successfully Finished Installation 01/06/2000 15:33:43 EXPECTED RESULT: All valid paths returned should end with a delimiter. This implementation will enable easy use with file operations that refer to specific files. For the case where the target folder is "Unknown", we should be returning null instead of a "valid" path.
Target Milestone: M14
Assignee: cathleen → dbragg
reassign to dbragg
Depends on: 25919
I never marked this assigned.
Status: NEW → ASSIGNED
Target Milestone: M14 → M17
Target Milestone: M17 → M15
moving to M16
Target Milestone: M15 → M16
this still is a problem :-( but I think that it is isolated to xpinstall, not nsDirectoryService. Here is linux's log: ------------------------------------------------------------------------------- http://jimbob/jars/f_getfolder_paths.xpi -- 04/23/2000 22:05:49 ------------------------------------------------------------------------------- Functional: f_getfolder_paths ----------------------------- ** targetFolder = Chrome ** getFolder returns = /builds/dougt/mozilla/dist/bin/chrome/ ** targetFolder = Communicator ** getFolder returns = /builds/dougt/mozilla/dist/bin/ ** targetFolder = Components ** getFolder returns = /builds/dougt/mozilla/dist/bin/components/ ** targetFolder = Current User ** getFolder returns = Current User ** targetFolder = file:/// ** getFolder returns = file:/// ** targetFolder = OS Drive ** getFolder returns = // ** targetFolder = Plugins ** getFolder returns = /builds/dougt/mozilla/dist/bin/plugins/ ** targetFolder = Preferences ** getFolder returns = Preferences ** getFolder returns = Preferences ** targetFolder = Program ** getFolder returns = /builds/dougt/mozilla/dist/bin/ ** targetFolder = Temporary ** getFolder returns = /tmp// ** targetFolder = User Pick ** getFolder returns = User Pick ** targetFolder = Unknown ** getFolder returns = Unknown ** targetFolder = Windows ** getFolder returns = Windows ** targetFolder = Win System ** getFolder returns = Win System ** targetFolder = Unix Lib ** getFolder returns = /usr/local/lib/netscape/ ** targetFolder = Unix Local ** getFolder returns = /usr/local/netscape/ ** targetFolder = Mac Apple Menu ** getFolder returns = Mac Apple Menu ** targetFolder = Mac Control Panel ** getFolder returns = Mac Control Panel ** targetFolder = Mac Desktop ** getFolder returns = Mac Desktop ** targetFolder = Mac Documents ** getFolder returns = Mac Documents ** targetFolder = Mac Extension ** getFolder returns = Mac Extension ** targetFolder = Mac Fonts ** getFolder returns = Mac Fonts ** targetFolder = Mac Preferences ** getFolder returns = Mac Preferences ** targetFolder = Mac Shutdown ** getFolder returns = Mac Shutdown ** targetFolder = Mac Startup ** getFolder returns = Mac Startup ** targetFolder = Mac System ** getFolder returns = Mac System ** targetFolder = Mac Trash ** getFolder returns = Mac Trash moving milestone out.
Target Milestone: M16 → M18
*** Bug 36915 has been marked as a duplicate of this bug. ***
on windows (mostlikly mac), nsInstallFolder will crash for any path that is not recongnized! mFileSpec is null, and will be dereferenced. I fixed once case this evening, but there are a ton others. I think that we should get rid of this constructor initialization, and have an explicted method which can return a result. I will start working on this now.
Assignee: dbragg → dougt
Severity: normal → critical
Status: ASSIGNED → NEW
Priority: P3 → P1
Target Milestone: M18 → M16
Attached patch nsInstallFolder explict Init() (deleted) — Splinter Review
Blocks: 30945
nominate for beta2
Keywords: nsbeta2
Target Milestone: M16 → M17
I thought that this was fixes before I left on vacation. marking that way.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Build: 2000-05-26-09-M16(WIN), 2000-05-26-08-M16(MAC), 2000-05-26-08-M16(LINUX) Platform-specific folders return -229 from other platforms. But for the folders that are supported, there is no delimiter problem. The issue of platform-specific folders is being tracked in another bug report. Marking Verified.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: