Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Cannot open read-only file anymore using nsFilePicker

VERIFIED FIXED in Firefox 11



Widget: Win32
6 years ago
6 years ago


(Reporter: Stefan Sitter, Assigned: jimm)



11 Branch
Windows 7

Firefox Tracking Flags

(firefox11 verified)


(Whiteboard: [qa!])


(1 attachment, 1 obsolete attachment)



6 years ago
I have several local ics calendar files that are marked as read-only on file system level.

Using menu File > Open > Calendar File to subscribe to them as a new calendar doesn't work anymore. I only get a Windows error message that the file is read-only and I need to choose a different file.

Fails using Lightning 1.4a1 + Thunderbird 12.0a1
Fails using Lightning 1.3a2 + Thunderbird 11.0a2
Works using Lightning 1.2b2 + Thunderbird 10.0

Comment 1

6 years ago
Seems to be a toolkit issue and can be reproduce using Firefox too.

Steps to Reproduce using Firefox:
1. Create file on local harddisc and mark it as read-only, e.g. a html webpage file.
2. In Firefox use menu File > Open File... and select the file

Actual result:
An error dialog stating that the file is read-only and a different file should be selected.

Expected result:
File is opened and the content is displayed.

Works in Firefox 10. Fails in Firefox 11.
Component: Provider: ICS/WebDAV → Widget: Win32
Product: Calendar → Core
QA Contact: ics-provider → win32
Summary: Cannot open/subscribe to read-only local ics calendar file anymore → Cannot open read-only file anymore using nsFilePicker
Version: Lightning 1.3 → 11 Branch

Comment 2

6 years ago
Hmm, not able to reproduce. I created the file as an admin, created a new standard user account, and marked the file for read-only access for that user. Then opened the file with the File->open dialog under the test account. Didn't have any problems. I will experiment some more. Maybe there is something unique set up that I might be missing?

Comment 3

6 years ago
Testing the regression range might help - those patches landed 2011-12-14, so they would be in the 12-15 build:

The zips of these builds make this pretty easy to test if you have some spare time Stefan.

Comment 4

6 years ago
I think I can see the potential cause though -

FOS_NOREADONLYRETURN should only be applied if mMode == modeSave.

Comment 5

6 years ago
In fact, it's the default value - 

FOS_NOREADONLYRETURN - Do not return read-only items. This is a default value for the Save dialog.

patch coming up.

Comment 6

6 years ago
Created attachment 589286 [details] [diff] [review]
Assignee: nobody → jmathies
Attachment #589286 - Flags: review?(netzen)

Comment 7

6 years ago
Created attachment 589298 [details] [diff] [review]

minor update on this - there's a mode case statement further down I can use.
Attachment #589286 - Attachment is obsolete: true
Attachment #589286 - Flags: review?(netzen)
Attachment #589298 - Flags: review?(netzen)
Comment on attachment 589298 [details] [diff] [review]

Review of attachment 589298 [details] [diff] [review]:

Looks good. 

Tested and everything is working correctly.
Tested on XP and it works consistent with the new functionality in this patch.
Attachment #589298 - Flags: review?(netzen) → review+

Comment 9

6 years ago
Regression range: Works in 11.0a1 (BuildID: 20111214031134)
                  Fails in 11.0a1 (BuildID: 20111215031153)

I'm not aware of anything special regarding setup. Windows 7 with NTFS file system. Same standard user is used to create the file, mark it read-only via context menu > properties > attributes, and running Firefox (fresh profile).

Comment 10

6 years ago

Let's get this into a nightly and test to see if it addresses the problem. My guess is it will.
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12

Comment 12

6 years ago
Comment on attachment 589298 [details] [diff] [review]

Another file pickers fix, the new file pickers code is in aurora so we need to get this in too. Low risk.
Attachment #589298 - Flags: approval-mozilla-aurora?

Comment 13

6 years ago
Verified fixed using Mozilla/5.0 (Windows NT 6.1; rv:12.0a1) Gecko/20120120 Firefox/12.0a1.
Blocks: 661991
Comment on attachment 589298 [details] [diff] [review]

[Triage Comment]
New file picker in 11, needed on Aurora.
Attachment #589298 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Comment 15

6 years ago
status-firefox11: --- → fixed
Whiteboard: [qa+]

Comment 16

6 years ago
Verified as fixed on:
Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0

Read-only files are selected and opened without any issues.

Thunderbird could not be tested since there is no Lightning version compatible with 11b1.
status-firefox11: fixed → verified
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.