Closed Bug 31259 Opened 25 years ago Closed 24 years ago

File.modDate & File.modDateChanged not working

Categories

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

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: depman1, Assigned: ssu0262)

References

Details

(Whiteboard: [nsbeta2+])

Attachments

(1 file)

builds 2000-03-09. mac & linux. another pathway problem. also see bug 30946. 1. Go to http://jimbob/cracked/a_fileop_filemoddatechanged/. Copy moddate2.txt to the "Program" folder. 2. Go to http://jimbob/trigger2.html 3. Select a_fileop_filemoddatechanged from menu. (uses f + jarSrc in script). 4. Trigger. 5. Check HD and logfile. Result: moddate.txt installed & compared (as expected). But File.modDate converted time stamp number = 0 (in Linux). Boolean values for File.modDateChanged are false . Expected: File.modDate returns correct converted value. Correct boolean values. note: try http://jimbob/jars/a_fileop_filemoddate2.xpi in the URL & trigger. This will work correctly on Linux, but not on Mac. Here are the 2 Linux log files: ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddatechanged.xpi -- 03/09/2000 14:24:04 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/1] Installing: /u/depstein/builds/M14/mar09/package/moddate.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = //u/depstein/builds/M14/mar09/packagemoddate.txt ** filemoddate returns = 0 ** Path to fileSource2 = //u/depstein/builds/M14/mar09/packagemoddate2.txt ** File.moddatechanged should return 0 (false) = false ** File.moddatechanged should return 1 (true) = false Install completed successfully Finished Installation 03/09/2000 14:24:04 ----------------------- ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddate2.xpi -- 03/09/2000 14:54:17 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/1] Installing: /u/depstein/builds/M14/mar09/package/moddate.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = //u/depstein/builds/M14/mar09/package/moddate.txt ** filemoddate returns = 952642457 ** Path to fileSource2 = //u/depstein/builds/M14/mar09/package/moddate2.txt ** File.moddatechanged should return 0 (false) = false ** File.moddatechanged should return 1 (true) = true Install completed successfully Finished Installation 03/09/2000 14:54:17
note that filemoddate2.xpi uses f + "/" + jarSrc in the script. Here are the Mac logs: ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddatechanged.xpi -- 03/09/2000 15:03:46 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/1] Installing: Macintosh HD:Desktop Folder:mozilla-mac-M15:moddate.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = Macintosh HD:Desktop Folder:mozilla-mac-M15: ** filemoddate returns = 3035459026 ** Path to fileSource2 = Macintosh HD:Desktop Folder:mozilla-mac-M15: ** File.moddatechanged should return 0 (false) = true ** File.moddatechanged should return 1 (true) = true Install completed successfully Finished Installation 03/09/2000 15:03:46 ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddate2.xpi -- 03/09/2000 15:04:49 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/1] Installing: Macintosh HD:Desktop Folder:mozilla-mac-M15:moddate.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = Macintosh HD:Desktop Folder:mozilla-mac-M15: ** filemoddate returns = 3035459089 ** Path to fileSource2 = Macintosh HD:Desktop Folder:mozilla-mac-M15: ** File.moddatechanged should return 0 (false) = true ** File.moddatechanged should return 1 (true) = true Install completed successfully Finished Installation 03/09/2000 15:04:50
Keywords: pp
QA Contact: jimmylee → depstein
Target Milestone: M15
reassign to dbragg bug meeting 3/20
Assignee: cathleen → dbragg
Depends on: 24984
moving to M16
Target Milestone: M15 → M16
okay on linux: ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddatechanged.xpi -- 04/23/2000 22:20:03 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/1] Installing: /builds/dougt/mozilla/dist/bin/moddate.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = /builds/dougt/mozilla/dist/bin/moddate.txt ** filemoddate returns = 1074773444 ** Path to fileSource2 = /builds/dougt/mozilla/dist/bin/moddate2.txt ** File.moddatechanged should return 0 (false) = true ** File.moddatechanged should return 1 (true) = true Finished Installation 04/23/2000 22:20:04 marking as fixed. needs to be verified on mac.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
File.modDate works fine on Linux and Mac, but not on WinNT or Win98. It returns '1' for # of milliseconds! File.modDateChanged is not working for comparing time stamp of moddate.txt to itself. This should return boolean value = false, since there is no change, but instead is returning true. I've included the logfile contents below. I also rewritten a_fileop_filemoddatechanged.xpi to install the 2nd file (moddate2.txt) instead of requiring it to be in the "Program" folder before triggering the xpi.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
nominate for pr2
Assignee: dbragg → dougt
Status: REOPENED → NEW
Keywords: ppnsbeta2
OS: Mac System 9.0 → All
Hardware: Macintosh → All
Summary: File.modDate & File.modDateChanged not working on Mac and linux → File.modDate & File.modDateChanged not working
Putting on [nsbeta2+] radar for beta2 fix.
Whiteboard: [nsbeta2+]
Depends on: 38553
I have changed how nsIFile pass mod dates around. Please verify this bug when you have time. :-)
Status: NEW → RESOLVED
Closed: 25 years ago25 years ago
Resolution: --- → FIXED
tested in build 2000-05-10-08-M16. Still happens. The 2 problems are: a) File.modDate is returning a numeric value of '1' on NT. This value should equal the # of miliseconds since 1970. b) File.modDateChanged is returning a boolean of "true" for the 1st comparison between the returned value of modDate from the first file and the same file itself. This is happening cross-platform. Since there should be no change between these two, the boolean should return "false". See logfile below. ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddatechanged.xpi -- 05/10/2000 11:31:53 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/2] Replacing: C:\Program Files\Netscape\Netscape 6\moddate.txt [2/2] Replacing: C:\Program Files\Netscape\Netscape 6\moddate2.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = C:\Program Files\Netscape\Netscape 6\moddate.txt ** filemoddate returns = 1 ** Path to fileSource2 = C:\Program Files\Netscape\Netscape 6\moddate2.txt ** File.moddatechanged should return 0 (false) = true ** File.moddatechanged should return 1 (true) = true Finished Installation 05/10/2000 11:31:53
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
//nsIFileXXX: need to get the ModDateChanged equivalent for nsIFile PRInt32 nsInstall::FileOpFileModDateChanged(nsInstallFolder& aTarget, nsFileSpec::TimeStamp& aOldStamp, PRBool* aReturn) { //nsFileSpec* localFS = aTarget.GetFileSpec(); //*aReturn = localFS->ModDateChanged(aOldStamp); return NS_OK; } They are not implemented!
Attached patch patch 1 (deleted) — Splinter Review
------------------------------------------------------------------------------- file:///c:/temp/a_fileop_filemoddatechanged.xpi -- 05/16/2000 14:59:24 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/2] Replacing: E:\cmonkey\mozilla\dist\WIN32_D.OBJ\bin\moddate.txt [2/2] Replacing: E:\cmonkey\mozilla\dist\WIN32_D.OBJ\bin\moddate2.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = E:\cmonkey\mozilla\dist\WIN32_D.OBJ\bin\moddate.txt ** filemoddate returns = 957465660000 ** Path to fileSource2 = E:\cmonkey\mozilla\dist\WIN32_D.OBJ\bin\moddate2.txt ** File.moddatechanged should return 0 (false) = false ** File.moddatechanged should return 1 (true) = true Finished Installation 05/16/2000 15:00:00 Fix in hand pending review.
Status: REOPENED → ASSIGNED
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
Fixed on NT and Linux, but currently blocked from testing it on Mac (38989). Will test on Mac when possible and mark verified then.
fixed on NT, Win98, and Linux. On Mac, File.modDateChanged is returning the correct booleans, but File.modDate is off with respect to UNIX system date. This is the number of milliseconds from 1/1/70 until the modified time stamp. The value is 957465660000 (at unix prompt: date -d "Thu May 4 11:41 PDT 2000" '+%s'). But Mac is returning 982640000000. Here's the logfile: ------------------------------------------------------------------------------- http://jimbob/jars/a_fileop_filemoddatechanged.xpi -- 05/26/2000 17:09:02 ------------------------------------------------------------------------------- Acceptance: a_fileop_filemoddatechanged --------------------------------------- [1/2] Installing: Macintosh HD:Desktop Folder:mozilla-mac-M16:moddate.txt [2/2] Installing: Macintosh HD:Desktop Folder:mozilla-mac-M16:moddate2.txt Install completed successfully The modify part --------------- ** Path to fileSource1 = Macintosh HD:Desktop Folder:mozilla-mac- M16:moddate.txt ** filemoddate returns = 982640000000 ** Path to fileSource2 = Macintosh HD:Desktop Folder:mozilla-mac- M16:moddate2.txt ** File.moddatechanged should return 0 (false) = false ** File.moddatechanged should return 1 (true) = true Install completed successfully Finished Installation 05/26/2000 17:09:03
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Dooming ssu with this dougt bug, sorry.
Assignee: dougt → ssu
Status: REOPENED → NEW
fixed. This fix *might* also happen to fix bugs #42070, #38553, and #36681. Actually, definitely #42070, but I'm not sure about the others.
Status: NEW → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
alright, good fix! Checked out cross-platform just to make sure. Fixed on Mac, Linux, NT and Win98.
Status: RESOLVED → VERIFIED
This bug is targeted for M16. It was fixed in the M17 build, but just tried it out in the latest M16 and it's not fixed there. reopening for M16 inclusion.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
I hardly think we'll be holding M16 for this fix. It's not dogfood. Feel free to reopen if I've misjudged.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Target Milestone: M16 → M17
The "Target Milestone" is just that, a target--and we missed. Oops. That hardly means the bug wasn't fixed. At this point in the project we've got far more pressing things to do than rearrange the milestones into any semblance of reality. Until after PR2 the only thing that matters is nsbeta2+ and dogfood+
OK,OK! my misunderstanding. the important thing is its fixed for beta2.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: