Closed Bug 317345 Opened 20 years ago Closed 20 years ago

nsLocalFile(OSX)::IsHidden is broken garbage

Categories

(Core Graveyard :: File Handling, defect)

1.8 Branch
PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: mark, Assigned: mark)

References

Details

(Keywords: fixed1.8.0.1, fixed1.8.1)

Attachments

(1 file)

In nsLocalFileOSX.cpp, nsLocalFile::IsHidden returns whatever it feels like returning, without regard for whether a file is actually hidden or not. The call to FSGetCatalogInfo requests kFSCatInfoNodeFlags, but IsHidden doesn't actually care about or use node flags. It does care about Finder attributes, but it's not getting those. FSGetCatalogInfo is filling in the wrong portion of the FSCatalogInfo struct (the nodeFlags field), and when IsHidden is looking at the finderInfo field, it's looking at leftover stack garbage. Since we don't actually care about nodeFlags in IsHidden, I'm removing kFSCatInfoNodeFlags and replacing it with kFSCatInfoFinderInfo. nsIFile::IsHidden is used by at least netwerk/base, xpfe/components/filepicker, and xpfe/components/search.
Attachment #203843 - Flags: superreview?(sfraser_bugs)
Attachment #203843 - Flags: review?(joshmoz)
Attachment #203843 - Flags: superreview?(sfraser_bugs) → superreview+
Attachment #203843 - Flags: review?(joshmoz) → review+
Checked in on the trunk. This is risk-free and ensures that the apps properly treat hidden files as hidden, and more importantly, visible files as visible.
Status: NEW → RESOLVED
Closed: 20 years ago
Flags: blocking1.8.0.1?
Resolution: --- → FIXED
*** Bug 314579 has been marked as a duplicate of this bug. ***
Comment on attachment 203843 [details] [diff] [review] Use kFSCatInfoFinderInfo to obtain Finder attributes a=dveditz
Attachment #203843 - Flags: approval1.8.1+
Attachment #203843 - Flags: approval1.8.0.1+
When this gets checked into the branches please add the appropriate fixed1.8.0.1 and fixed1.8.1 keywords to the bug
Flags: blocking1.8.1+
Flags: blocking1.8.0.1?
Flags: blocking1.8.0.1+
Checked in to 1_8 and 1_8_0.
Target Milestone: --- → mozilla1.8.1
Mark: Is there any easy way for QA to verify this bug?
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: