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)
Core Graveyard
Installer: XPInstall Engine
Tracking
(Not tracked)
VERIFIED
FIXED
M17
People
(Reporter: jimmykenlee, Assigned: dougt)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Details | Diff | Splinter Review |
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.
Assignee | ||
Comment 4•25 years ago
|
||
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
Assignee | ||
Comment 6•25 years ago
|
||
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
Assignee | ||
Comment 7•25 years ago
|
||
Assignee | ||
Comment 9•25 years ago
|
||
I thought that this was fixes before I left on vacation. marking that way.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 10•24 years ago
|
||
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
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•