Closed Bug 15603 Opened 25 years ago Closed 25 years ago

File op: Install.log incorrectly informs that file copy to unknown dir is successful

Categories

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

All
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jimmykenlee, Assigned: ssu0262)

Details

Build: 10/4/99 SeaMonkey build

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

Install.StartInstall("Functional: f_fileop_filecopy_unknowndir",
"f_fileop_filecopy_unknowndir", "1.1.1.1", 0);
f = Install.GetFolder("Program");
g = Install.GetFolder("Chrome");
err1 = Install.AddSubcomponent("fileop_filecopy_unknowndir", jarSrc, f, jarSrc);
Install.LogComment("AddSubcomponent returns = " + err1);

fileSource = f + "/smrtupdt.txt";
fileTarget = g + "/unknowndir/";
err2 = Install.FileCopy(fileSource, fileTarget);
Install.LogComment("FileCopy returns = " + err2);

RESULT:
The file is not copied to the unknown directory as expected.  However, the
Install.log shows the following:

---------------------------------------------------------------------------
http://jimbob/jars/f_fileop_filecopy_unknowndir.xpi   --   10/05/1999 12:39:05
---------------------------------------------------------------------------

     Functional: f_fileop_filecopy_unknowndir
     ----------------------------------------

     ** AddSubcomponent returns = 0
     ** FileCopy returns = 0
     Item [1/2]	Installing: C:\Program Files\moz104\x86rel\smrtupdt.txt
     Item [2/2]	Copy File: C:\Program Files\moz104\x86rel\smrtupdt.txt to
                           C:\Program Files\moz104\x86rel\chrome\unknowndir

     Install completed successfully
     Finished Installation  10/05/1999 12:39:05

EXPECTED RESULT:
The Install.log does not indicate that the file was copied since it did not
actually occur.
Assignee: cathleen → ssu
Target Milestone: M11
Status: NEW → ASSIGNED
So fileCopy supports a directory as the target? Can we pull this off on all
systems? Maybe we should require both arguments to be file names.

This item is one which can probable best be done during the Prepare() stage so
we can return an error in time for the user to deal with it. Copy to a temp
name just in case an old file of the target name exists already. If the copy
item fails during Complete() (really just a rename at this point, or schedule
for rename later) we should return an error and abort the rest of the install
-- we have no way of knowing how crucial the copied file is to the correct
operation of the installed software.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This has been fixed when I overhauled the fileop functions to better detect and
deal with errors.
Status: RESOLVED → VERIFIED
Build 1999-10-27-09-M11(WIN), 1999-10-27-08-M11(MAC), 1999-10-27-08-M11(LINUX)

We correctly error out now with -214.
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.