Closed
Bug 43965
Opened 24 years ago
Closed 16 years ago
APIs accepting null folder object (e.g. addFile, addDir) don't return error.
Categories
(Core Graveyard :: Installer: XPInstall Engine, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: depman1, Assigned: dveditz)
Details
Linux and Win. builds 2000-06-26-08-M17. 1. Run Linux or Win build. 2. Go to http://jimbob/trigger3.html 3. Select one of the Mac getFolder() cases. examples: a_getfolder_1_macctrlpanel.xpi, a_getfolder_1_macextension.xpi 4. Press Trigger. Then OK. 5. Check logfile. Result: Script cancels, but no error is returned to log file. Expected: Post the error to the log file. Note: I added a logComment to the script and found that -208 is returned. This is an OK error since, for example, "Mac Control Panel" is an invalid parameter when run on a non-Mac platform. log files: ------------------------------------------------------------------------------- http://jimbob/jars/a_getfolder_1_macctrlpanel.xpi -- 06/26/2000 16:35:21 ------------------------------------------------------------------------------- Acceptance: a_getfolder_1_macctrlpanel -------------------------------------- Install cancelled by script Finished Installation 06/26/2000 16:35:21 ------------------------------------------------------------------------------- file:///C|/XPIStage/test/test.xpi -- 06/27/2000 11:24:24 ------------------------------------------------------------------------------- Acceptance: a_getfolder_1_macctrlpanel -------------------------------------- ** returned value = -208 Install cancelled by script Finished Installation 06/27/2000 11:24:24 install script: regName = "getfolder_1_macctrlpanel"; jarSrc = "smrtupdt.txt"; var vi = "1.0.1.19"; initInstall("Acceptance: a_getfolder_1_macctrlpanel", regName, vi, 0); f = getFolder("Mac Control Panel"); err = addFile(regName, jarSrc, f, jarSrc); logComment("returned value = " + err); if (0 == getLastError()) performInstall(); else cancelInstall();
Assignee | ||
Comment 1•24 years ago
|
||
getFolder() does not return errors nor print them in the log, it simply returns a null. It does not distinguish between a folder that might be OK in some other environment and total garbage, it should return null instead of a valid folder object in both cases. You should probably get in the habit of logging the return value from getFolder() in your tests just as you log error values elsewhere. The -208 error is from addFile() because you passed a null, it doesn't distinguish between typing in the word null in the script or a variable set to null. Unless I'm misunderstanding the bug this is the way it's supposed to work.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•24 years ago
|
||
my mistake with the logComment. It should have been capturing the return value of getFolder(). It is returning null. file:///C|/XPIStage/test/test.xpi -- 06/27/2000 12:16:15 ------------------------------------------------------------------------------- Acceptance: a_getfolder_1_macctrlpanel -------------------------------------- ** return value from get folder = null Install cancelled by script Finished Installation 06/27/2000 12:16:16
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 3•24 years ago
|
||
Reopened bug. Summary reworded. The real problem here is that when getFolder returns a null folder object, and the object is passed to an API that accepts it (addFile, addDirectory, registerChrome, setPackageFolder, Patch) error isn't returned by XP. Expecting -208 to be returned. created 43965.xpi on http://jimbob/bugs (this is the AddDir case). some sample script snippets: regName = "getfolder_1_macctrlpanel"; jarSrc = "smrtupdt.txt"; var vi = "1.0.1.19"; initInstall("Acceptance: a_getfolder_1_macctrlpanel", regName, vi, 0); f = getFolder("Mac Control Panel"); logComment("return value from get folder = " + f); err = addFile(regName, jarSrc, f, jarSrc); logComment("addFile error = " + err); if (0 == getLastError()) performInstall(); else cancelInstall(); ---------------------------------------------------------------------- ... err = registerChrome(PACKAGE, null); ...
Status: VERIFIED → REOPENED
QA Contact: jimmylee → depstein
Resolution: INVALID → ---
Summary: Mac target folders don't return error when run on other platforms → APIs accepting null folder object (e.g. addFile, addDir) don't return error.
Reporter | ||
Comment 5•20 years ago
|
||
Test case can be triggered from http://www.mozilla.org/quality/smartupdate/xpinstall-trigger.html Just select one of the Mac Getfolder items from the Acceptance Test Case menu (e.g. a_getfolder_1_macctrlpanel, a_getfolder_1_macextension)
Assignee | ||
Comment 6•16 years ago
|
||
The xpinstall script engine has been removed from the trunk, bugs in it are obsolete.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago → 16 years ago
Resolution: --- → WONTFIX
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•