Cannot open read-only file anymore using nsFilePicker

VERIFIED FIXED in Firefox 11

Status

()

Core
Widget: Win32
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: Stefan Sitter, Assigned: jimm)

Tracking

({regression})

11 Branch
mozilla12
x86
Windows 7
regression
Points:
---

Firefox Tracking Flags

(firefox11 verified)

Details

(Whiteboard: [qa!])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 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
(Reporter)

Comment 1

5 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
(Assignee)

Comment 2

5 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?
(Assignee)

Comment 3

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

http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/

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

Comment 4

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

http://mxr.mozilla.org/mozilla-central/source/widget/windows/nsFilePicker.cpp#896

FOS_NOREADONLYRETURN should only be applied if mMode == modeSave.
(Assignee)

Comment 5

5 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.
(Assignee)

Comment 6

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

Comment 7

5 years ago
Created attachment 589298 [details] [diff] [review]
patch

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]
patch

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+
(Reporter)

Comment 9

5 years ago
Regression range: Works in 11.0a1 (BuildID: 20111214031134)
                  Fails in 11.0a1 (BuildID: 20111215031153)
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=fd6ab19f312c&tochange=beac16509534

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).
(Assignee)

Comment 10

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/0e424ab9ddff

Let's get this into a nightly and test to see if it addresses the problem. My guess is it will.
https://hg.mozilla.org/mozilla-central/rev/0e424ab9ddff
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
(Assignee)

Comment 12

5 years ago
Comment on attachment 589298 [details] [diff] [review]
patch

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?
(Reporter)

Comment 13

5 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]
patch

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

Comment 15

5 years ago
https://hg.mozilla.org/releases/mozilla-aurora/rev/8c5e5c1089da
status-firefox11: --- → fixed
Whiteboard: [qa+]

Comment 16

5 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: RESOLVED → VERIFIED
status-firefox11: fixed → verified
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.