Closed Bug 15644 Opened 25 years ago Closed 25 years ago

File op: FileDelete does not delete read-only consistently across platforms

Categories

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

All
Windows NT
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jimmykenlee, Assigned: dbragg)

Details

Build: 10/5/99 SeaMonkey build 1. Copy any "filedelete.txt" to the /Chrome directory of SeaMonkey and mark this file read-only 2. From http://jimbob/trigger2.html, trigger http://jimbob/jars/f_fileop_filedelete_only.xpi StartInstall("Functional: f_fileop_filedelete_only", "f_fileop_filedelete_only", "1.1.1.1", 0); g = GetFolder("Chrome"); fileSource = g + "/filedelete.txt"; err2 = FileDelete(fileSource); LogComment("Path to filedelete.txt = " + fileSource); LogComment("FileDelete returns = " + err2); RESULT: For Linux, the file unexpectedly is deleted. For Windows and Mac, the file is not deleted. However, from all platforms, the Install.log indicates that the file was deleted. For example, the Install.log from Windows shows: --------------------------------------------------------------------------- http://jimbob/jars/f_fileop_filedelete_only.xpi -- 10/05/1999 17:07:19 --------------------------------------------------------------------------- Acceptance: a_fileop_filedelete_only ------------------------------------ ** Path to filedelete.txt = C:\Program Files\moz105\x86rel\chrome/filedelete.txt ** FileDelete returns = 0 Item [1/1] Delete File: C:\Program Files\moz105\x86rel\chrome\filedelete.txt Install completed successfully Finished Installation 10/05/1999 17:07:20 EXPECTED RESULT: The file from Linux should not be deleted. The Install.log from all platforms should return an error or not report that the file was deleted.
Assignee: cathleen → ssu
Target Milestone: M11
Status: NEW → ASSIGNED
The fileops functions have been overhauled to better detect and deal with errors. This fixes part of this bug which says that FileDelete() does not log correct expected failure behaviors. As for the under Unix deleting files unexpectedly, Jimmy, can you tell me what command you used to make the file read-only under unix?
Target Milestone: M11 → M12
Moving non-dogfood bugs to M13
Bulk move of XPInstall (component to be deleted) bugs to Installer: XPInstall Engine
Blocks: 22176
Target Milestone: M13 → M14
this is a problem with nsFileSpec. I simply call nsFileSpec::Delete(). Reassigning to dougt.
Assignee: ssu → dougt
Status: ASSIGNED → NEW
moving to m15
Target Milestone: M14 → M15
over to dbragg. he is going to intergrate nsIFile into xpInstall.
Assignee: dougt → dbragg
moving to M16
Target Milestone: M15 → M16
on linux the file is no longer deleted and the install log does indicate this: ------------------------------------------------------------------------------- http://jimbob/jars/f_fileop_filedelete_only.xpi -- 04/23/2000 21:51:36 ------------------------------------------------------------------------------- Install **FAILED** with error -229 Finished Installation 04/23/2000 21:51:37 Still needs to be verified on mac and windows.
windows is verifed: ------------------------------------------------------------------------------- http://jimbob/jars/f_fileop_filedelete_only.xpi -- 04/23/2000 22:46:32 ------------------------------------------------------------------------------- Install **FAILED** with error -229 Finished Installation 04/23/2000 22:46:41 the file still exists. marking as fixed. still will need to be verified on the mac.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Build: 2000-04-26-09-M16(WIN), 2000-04-21-16-M16(MAC), 2000-04-21-13-M16(LINUX) Install script has been rewritten to correct the error -229. The test behaves consistently with each OS. Marking Verified!
Status: RESOLVED → VERIFIED
No longer blocks: 22176
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.