Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.4
-
None
-
-
90345459f (dev), e96199f5c (6.5), dd4a42e86 (6.6)
Description
QFileDialog's helper has the following method: https://github.com/qt/qtbase/blob/d4d91d7131abccb35245c3f8fb4802152b11591c/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm#L210-L267
This method is called by the open/save panel for every file visible in the open/save panel, not just files the user selects, to decide whether to make it selectable.
When this happens on a protected directory, the call to attributesOfItemAtPath:error: (and maybe the others, since the first call would hide the rest) triggers the macOS privacy prompt, asking the user to give the application permission to access that directory.
To reproduce:
- Download a copy of PCSX2, from before we started patching this out: https://github.com/PCSX2/pcsx2/releases/tag/v1.7.4651
- Click Start File
- Go into your documents folder in the file picker (without actually selecting a file)
Expected result:
- PCSX2 does not request access to your documents
Actual result:
- PCSX2 requests access to your documents
(Note: It's not just documents. If your file pickers are set to column view and PCSX2 starts a save dialogue in ~/Library/Application Support/PCSX2/videos, the column view will display the contents of ~/Library/, and request access to your calendar, etc, which is really weird for users since it seems completely out of nowhere)