Closed Bug 1385755 Opened 7 years ago Closed 5 years ago

symlink user.js treat as 0 bytes on Windows

Categories

(Core :: Preferences: Backend, defect)

56 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: kudwafter114514, Assigned: kmag)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file Captued log by Procmon
User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643

Steps to reproduce:

1. ``mklink user.js user.txt`` in profile directory.
2. write some setting to user.txt.
3. (Re)Start Firefox.

Build ID 	20170730100307
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0


Actual results:

Firefox dones not read user.js.

Started from Firefox 45(Build ID 	20160303134406).


Expected results:

Firefox read setting from user.js.

Until Firefox 44(Build ID 	20160123151951) was reading the link target.
Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
Code in question: https://dxr.mozilla.org/mozilla-central/source/modules/libpref/Preferences.cpp#1266

Regression caused by bug 1219310. I wonder if we could ask the *stream* for its size, rather than the file. Otherwise we'll need to add symlink resolution to the nsIFile which is a PITA.
Blocks: 1219310
Component: Startup and Profile System → Preferences: Backend
Flags: needinfo?(nfroyd)
Keywords: regression
Product: Toolkit → Core
(In reply to Benjamin Smedberg [:bsmedberg] from comment #1)
> Code in question:
> https://dxr.mozilla.org/mozilla-central/source/modules/libpref/Preferences.
> cpp#1266
> 
> Regression caused by bug 1219310. I wonder if we could ask the *stream* for
> its size, rather than the file. Otherwise we'll need to add symlink
> resolution to the nsIFile which is a PITA.

We were asking the stream for its size before bug 1219310, so I think we can certainly do that. :)  I guess we could just back out the first part of the bug?  Do we have any sort of policy on symlinks in the profile directory?
Flags: needinfo?(nfroyd)
No policy. People do lots of weird shit though.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Assignee: nobody → kmaglione+bmo
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: