Closed
Bug 238257
Opened 21 years ago
Closed 21 years ago
File URLs don't respect XUL directory listing format preference
Categories
(Core :: Networking: File, defect)
Core
Networking: File
Tracking
()
VERIFIED
FIXED
mozilla1.8alpha1
People
(Reporter: neil, Assigned: neil)
References
()
Details
(Keywords: regression)
Attachments
(1 file)
7.55 KB,
patch
|
darin.moz
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce problem:
1. Edit->Preferences->Debug->Networking
2. Change the Directory Listing Format to XUL
3. Restart Mozilla
4. Browse to file:/// or whatever applies to your platform, e.g. file:///C:/
Expected results: XUL tree-based directory
Actual results: HTML directory listing
Assignee | ||
Comment 1•21 years ago
|
||
Seems like the channel should support nsIDirectoryListing anyway...
Assignee: darin → neil.parkwaycc.co.uk
Status: NEW → ASSIGNED
Assignee | ||
Updated•21 years ago
|
Attachment #144505 -
Flags: superreview?(darin)
Attachment #144505 -
Flags: review?(darin)
Comment 2•21 years ago
|
||
You can't do this. To be locale safe, you need to go through intl. And intl
isn't threadsafe, or at least it never used to be.
Or something like that - I can't really rememebr the details from 2.5 years ago.
Try this on a chinese windows version, or something along those lines.
Assignee | ||
Comment 3•21 years ago
|
||
Excuse me, but the patch has nothing to do with intl or locale, it's just moving
the preference from the protocol to the channel...
Comment 4•21 years ago
|
||
Right, but you're changing which thread this all happens on, by doing this. This
way, it happens from a callback on the file io thread, rather than doing is
separately in the main thread. I think.
don't you get assertions in a debug build with this?
Assignee | ||
Comment 5•21 years ago
|
||
Actually the patch just copies nsFTP/GopherChannel/ProtocolHandler :-P
Comment 6•21 years ago
|
||
Yes, but file IO happens on a separate thread to the rest of necko. Or at least
it did 2.5 years ago... See bug 99382.
Darin?
Maybe I should try this out and try to break it. Or maybe its already broken
from an intl point of view anyway.
Assignee | ||
Comment 7•21 years ago
|
||
bbaetz, perhaps you can start by explaining how the FTP/Gopher code is wrong?
Comment 8•21 years ago
|
||
Its not wrong. The issue is that FTP/Gopher/etc happens on the necko thread. For
file, the actions are proxied out to another thread, which causes teh generation
of the data to happen on a different thread to the processing of it, causing
these issues
I will confirm this this evening (my time)
Assignee | ||
Comment 9•21 years ago
|
||
I think this happens before any data is generated... SetListFormat is called
before DoChannelLoad is.
Comment 10•21 years ago
|
||
um, doesn't all interaction with channels happen on the same thread, namely the
UI thread?
Comment 11•21 years ago
|
||
bbaetz: the only non-UI thread code is the code in nsDirectoryIndexStream.cpp,
and currently we have ifdef'd out all the unicode conversion and collation code.
the http-index-format stream will contain filenames in the charset of the
"native" filesystem charset. it appears that nsIndexedToHTML.cpp utilizes
nsITextToSubURI to convert to unicode strings. so, modulo the collation bugs,
we should end up with HTML that shows file names properly. looking over the
nsDirectoryViewer.cpp code, it appears that it does not do any similar unicode
conversion. instead, it just does an AssignWithConversion. IOW, it seems to
assume that all filenames are ASCII.
the directory listing format is anyways a hidden pref. the XUL directory viewer
is an unfinished (broken) piece of code. there also isn't an owner for it AFAIK.
ultimately, i want to do away with the way directory listings are handled. i
think that necko should always just generate http-index-format for directories.
at the uriloader level we should either invoke the indexed-to-html stream
converter or we should invoke a content handler for http-index-format. the pref
should be honored at that level instead.
that said, i'm mostly ok with this patch.
Updated•21 years ago
|
Attachment #144505 -
Flags: superreview?(darin)
Attachment #144505 -
Flags: superreview+
Attachment #144505 -
Flags: review?(darin)
Attachment #144505 -
Flags: review+
Assignee | ||
Updated•21 years ago
|
Target Milestone: --- → mozilla1.8alpha
Comment 12•21 years ago
|
||
Hmm. OK. That must have changed in the last couple of years. No objection from
me, then.
Comment 13•21 years ago
|
||
*** Bug 201672 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 14•21 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 15•20 years ago
|
||
V/fixed.
1.53 neil%parkwaycc.co.uk 2004-04-12 15:31 Bug 238257 File URLs aren't
respecting user network.dir.format pref r/sr=darin
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•