Closed Bug 1906405 Opened 3 months ago Closed 3 months ago

GetLast(Accessed|Modified)Time and *OfLinks are switched each other on Windows

Categories

(Core :: XPCOM, defect)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr128 --- wontfix
firefox128 --- wontfix
firefox129 --- fixed

People

(Reporter: emk, Assigned: emk)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

  1. Create a file on Windows Console: type nul > C:\ProgramData\foo
  2. Create a symlink on Windows Console: mklink C:\ProgramData\bar C:\ProgramData\foo
  3. Type following commands into Browser Console:
foo = FileUtils.File("C:\\ProgramData\\foo");
bar = FileUtils.File("C:\\ProgramData\\bar");
[bar.creationTime, bar.lastAccessedTime, bar.lastModifiedTime, bar.creationTimeOfLink, bar.lastAccessedTimeOfLink, bar.lastModifiedTimeOfLink]

Actual result (example):

Array(6) [ 1720162713196, 1720162758937, 1720162758937, 1720162758937, 1720162713196, 1720162713196 ]

Last accessed time and last modified time are swapped (creation time is ok). The link targets (the former three) can't be newer than the links themselves (the latter three).

Expected result (example):

Array(6) [ 1720162713196, 1720162713196, 1720162713196, 1720162758937, 1720162758937, 1720162758937 ]

If aFollowLinks parameter is true, GetDateImpl should get timestamps of link targets by following the links. If aFollowLinks is false, GetDateImpl should get timestamps of link themselves. But the current GetDateImpl is doing the opposite.

I found another defect of the patch in bug 1786608. Commented on D155926.

:beth, since you are the author of the regressor, bug 1786608, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(brennie)
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Pushed by VYV03354@nifty.ne.jp: https://hg.mozilla.org/integration/autoland/rev/d40105caed00 Fix nsLocalFile::GetLast(Accessed|Modified)Time. r=xpcom-reviewers,emilio
Flags: needinfo?(VYV03354)
Pushed by VYV03354@nifty.ne.jp: https://hg.mozilla.org/integration/autoland/rev/012d30f6eae4 Fix nsLocalFile::GetLast(Accessed|Modified)Time. r=xpcom-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Flags: needinfo?(brennie)

Is there a user-facing impact from this bug that would make us want to consider uplifting the fix?

Flags: needinfo?(VYV03354)

No. This is very edge-case scenario.

Flags: needinfo?(VYV03354)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: