Closed Bug 21085 Opened 26 years ago Closed 26 years ago

If file exists in target location, filemove returns -201 error (not specific enough).

Categories

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

x86
Windows NT

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: depman1, Assigned: ssu0262)

Details

build 1999120608-M12. reproduced on Win98. also see 20773 Make sure that smrtupdt.txt is not located in /TEMP 1. Go to XPInstall test page: http://jimbob/trigger2.html. 2. From the dropdown menu, select a_fileop_filemove. 3. Press Trigger case. OK. 4. Check target directory (/TEMP). smrtupdt.txt should be there. at this point, logfile looks like this: Acceptance: a_fileop_filemove ----------------------------- ** Path to fileSource = C:\Program Files\Netscape\Seamonkey\smrtupdt.txt ** Path to fileTarget = C:\TEMP\ ** fileMove returns = 0 Item [1/2] Installing: C:\Program Files\Netscape\Seamonkey\smrtupdt.txt Item [2/2] Move File: C:\Program Files\Netscape\Seamonkey\smrtupdt.txt to C:\TEMP\ Install completed successfully Finished Installation 12/07/1999 10:50:44 5. Run filemove script a 2nd time. 6. Check logfile. Result 2: (logfile contents): Acceptance: a_fileop_filemove ----------------------------- ** Path to fileSource = C:\Program Files\Netscape\Seamonkey\smrtupdt.txt ** Path to fileTarget = C:\TEMP\ ** fileMove returns = 0 Item [1/2] Installing: C:\Program Files\Netscape\Seamonkey\smrtupdt.txt Install **FAILED** with error -201 Install **FAILED** with error -201 Finished Installation 12/07/1999 10:51:06 Expected: Filemove install is successful w/o errors. Here is the filemove script: //////////////////////////////////////////////////////////////////////////////// //////// // a_fileop_filemove.js // // Acceptance test // • Checks if a known file can be moved to known directory // // ~ XPInstall QA // October 12, 1999 //////////////////////////////////////////////////////////////////////////////// ////////// jarSrc = "smrtupdt.txt"; startInstall("Acceptance: a_fileop_filemove", "acceptance", "1.1.1.1", 0); f = getFolder("Program"); g = getFolder("Temporary"); addFile("fileop_filemove", "2.2.2.2", jarSrc, f, jarSrc, true); fileSource = f + jarSrc; fileTarget = g; err1 = fileMove(fileSource, fileTarget); logComment("Path to fileSource = " + fileSource); logComment("Path to fileTarget = " + fileTarget); logComment("fileMove returns = " + err1); if (0 == getLastError()) finalizeInstall(); else abortInstall();
Target Milestone: M13
QA Contact: jimmylee → depstein
Reassigning QA Contact to David.
Bulk move of XPInstall (component to be deleted) bugs to Installer: XPInstall Engine
*** Bug 21984 has been marked as a duplicate of this bug. ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → INVALID
Maybe I'm misunderstanding the bug, but you cannot "move" a file on top of a file that already exists. Try "mv" in unix, or "ren" in DOS.
Severity: normal → minor
Status: RESOLVED → REOPENED
Summary: If a file already exists in the target location, filemove script fails. Error -201 returned, Install Failed. → If file exists in target location, filemove returns -201 error (not specific enough).
reopened bug. Summary changed from the problem being that the script failed to returning a more descriptive error. currently, it returns -201 = unexpected error. A couple of ideas for better error #s are -230 = already exists, -226 = filename already used.
Resolution: INVALID → ---
Clearing INVALID resolution due to reopen of this bug.
Assignee: cathleen → ssu
Status: REOPENED → NEW
reassign to ssu (please also check if filecopy has this problem, and apply fix too)
Status: NEW → RESOLVED
Closed: 26 years ago26 years ago
Resolution: --- → FIXED
fixed. it will now return error -230 and trigger the abortInstall() function instead of dying a horrible death in finalizeInstall(). I've also fixed the same problem with fileCopy().
now returns -230 error and script aborts.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.