GetFolder: String objects returned are inconsistent with delimiter

VERIFIED INVALID

Status

Core Graveyard
Installer: XPInstall Engine
P3
major
VERIFIED INVALID
18 years ago
2 years ago

People

(Reporter: Jimmy Lee, Assigned: dougt)

Tracking

Trunk
All
Windows NT

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

18 years ago
Build: 10/6/99 SeaMonkey build

1. From http://jimbob/trigger2.html, trigger
   http://jimbob/jars/f_getfolder_paths.xpi

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, the Install.log shows:
---------------------------------------------------------------------------
http://jimbob/jars/f_getfolder_paths.xpi     --     10/07/1999 10:40:49
---------------------------------------------------------------------------

     Functional: f_getfolder_paths
     -----------------------------

     ** targetFolder = Chrome
     ** getFolder returns = C:\PROGRAM FILES\MOZ106\X86REL\chrome
     ** targetFolder = Communicator
     ** getFolder returns = C:\PROGRAM FILES\MOZ106\X86REL\
     ** targetFolder = Components
     ** getFolder returns = C:\PROGRAM FILES\MOZ106\X86REL\components
     ** targetFolder = Current User
     ** getFolder returns = C:\PROGRAM FILES\Users50\default
     ** targetFolder = file:///
     ** getFolder returns = C:\Program Files\moz106\x86rel\file:\\\
     ** targetFolder = OS Drive
     ** getFolder returns = C:\
     ** targetFolder = Plugins
     ** getFolder returns = C:\PROGRAM FILES\MOZ106\X86REL\plugins
     ** targetFolder = Preferences
     ** getFolder returns = C:\PROGRAM FILES\Users50\default
     ** targetFolder = Program
     ** getFolder returns = C:\PROGRAM FILES\MOZ106\X86REL\
     ** targetFolder = Temporary
     ** getFolder returns = C:\WIN98\TEMP\
     ** targetFolder = User Pick
     ** getFolder returns = C:\Program Files\moz106\x86rel\User Pick
     ** targetFolder = Unknown
     ** getFolder returns = C:\Program Files\moz106\x86rel\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  10/07/1999 10:40:49

For Linux, the Install.log shows:

---------------------------------------------------------------------------
http://jimbob/jars/f_getfolder_paths.xpi     --     10/07/1999 10:41:29
---------------------------------------------------------------------------

     Functional: f_getfolder_paths
     -----------------------------

     ** targetFolder = Chrome
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package/chrome
     ** targetFolder = Communicator
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package
     ** targetFolder = Components
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package/components
     ** targetFolder = Current User
     ** getFolder returns = /u/jimmylee/.mozilla/mozProfile
     ** targetFolder = file:///
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package/file:///
     ** targetFolder = OS Drive
     ** getFolder returns = /
     ** targetFolder = Plugins
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package/plugins
     ** targetFolder = Preferences
     ** getFolder returns = /u/jimmylee/.mozilla/mozProfile
     ** targetFolder = Program
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package
     ** targetFolder = Temporary
     ** getFolder returns = /tmp/
     ** targetFolder = User Pick
     ** getFolder returns = /u/jimmylee/linux60/oct_06/package/User Pick
     ** targetFolder = Unknown
     ** getFolder returns = /u/jimmylee/linux60/oct_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  10/07/1999 10:41:31

For Macintosh, the Install.log shows:
---------------------------------------------------------------------------
http://jimbob/jars/f_getfolder_paths.xpi     --     10/07/1999 10:46:41
---------------------------------------------------------------------------

     Functional: f_getfolder_paths
     -----------------------------

     ** targetFolder = Chrome
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:Chrome:
     ** targetFolder = Communicator
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:
     ** targetFolder = Components
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:Components:
     ** targetFolder = Current User
     ** getFolder returns = Webbies:Documents:Mozilla:Users50:mozProfile:
     ** targetFolder = file:///
     ** getFolder returns =
     ** targetFolder = OS Drive
     ** getFolder returns = Webbies:
     ** targetFolder = Plugins
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:Plugins:
     ** targetFolder = Preferences
     ** getFolder returns = Webbies:Documents:Mozilla:Users50:mozProfile:
     ** targetFolder = Program
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:
     ** targetFolder = Temporary
     ** getFolder returns = Webbies:Temporary Items:
     ** targetFolder = User Pick
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:User Pick
     ** targetFolder = Unknown
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:Unknown
     ** targetFolder = Windows
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:�¡
     ** targetFolder = Win System
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:�¡
     ** targetFolder = Unix Lib
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:�¡
     ** targetFolder = Unix Local
     ** getFolder returns = Webbies:moz106:mozilla-mac-M11:�¡
     ** 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  10/07/1999 10:46:45

EXPECTED RESULT:
All valid paths returned should end with a delimiter.  For the case where the
target folder is "Unknown", we should be returning null instead of a "valid"
path.
(Reporter)

Comment 1

18 years ago
I forgot to paste in my script.  Here it is:

////////////////////////////////////////////////////////////////////////////////
// f_getfolder_paths.js
//
// Functional test
// 	• Checks the path form returned with getFolder() for all target folders
//
// ~ XPInstall QA
//   October 5, 1999
////////////////////////////////////////////////////////////////////////////////

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();

Updated

18 years ago
Assignee: cathleen → dougt

Comment 2

18 years ago
Doug, can you take a look at this bug?
(Assignee)

Updated

18 years ago
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → INVALID
(Assignee)

Comment 3

18 years ago
The delimiters used are native to what the platform defines.  Please note that
forward slashes are used, regardless of the platform, when adding to a path.
Marking as invalid.
(Reporter)

Comment 4

18 years ago
No worries.
Status: RESOLVED → VERIFIED

Comment 5

18 years ago
Bulk move of XPInstall (component to be deleted) bugs to Installer: XPInstall
Engine
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.