Closed
Bug 173099
Opened 23 years ago
Closed 22 years ago
GetFileTokenForPath() is declared in base class instead port-implementations
Categories
(Core Graveyard :: File Handling, defect, P4)
Core Graveyard
File Handling
Tracking
(Not tracked)
VERIFIED
WONTFIX
mozilla1.7beta
People
(Reporter: sergei_d, Assigned: bzbarsky)
References
Details
GetFileTokenForPath() in uriloader/exthandler is declared in base class
(uriloader/exthandler/nsExternalHelperAppService.h) instead port-implementations
It reduces flexibility and causes (re)conversion overheads sometimes - see
comments to bug 145860 for explanation and details
http://bugzilla.mozilla.org/show_bug.cgi?id=145860#c33
Hope Boris will set proper component for this bug.
| Assignee | ||
Comment 2•23 years ago
|
||
I'll try to get to this sometime, but it won't be for a few weeks... so don't
hold up bug 145860 for this. ;)
Assignee: asa → bzbarsky
Component: Browser-General → File Handling
Priority: -- → P3
QA Contact: asa → sairuh
Updated•23 years ago
|
QA Contact: sairuh → petersen
| Assignee | ||
Updated•23 years ago
|
Priority: P3 → P4
Target Milestone: --- → mozilla1.7beta
Comment 3•23 years ago
|
||
so... how is GetFileTokenForPath different from NS_NewLocalFile?
| Assignee | ||
Comment 4•23 years ago
|
||
It resolves relative to each component of $PATH in turn until it finds a file.
So if $PATH == /bin:/usr/bin:/sbin and the path is "emacs" it would come out
with an nsIFile pointing to /usrb/bin/emacs
Comment 5•23 years ago
|
||
ok, but in that case, isn't it needed by GetMIMEInfoFromDS?
| Assignee | ||
Comment 6•23 years ago
|
||
No, GetMIMEInfoFromDS only handles absolute paths... See bug 56662. Since on
the Mac the data stored in the DS is not a path, really, things are hard.
Comment 7•23 years ago
|
||
| Assignee | ||
Comment 8•23 years ago
|
||
Hrm. Looks like a Mac bug in waiting to me unless GetFileTokenForPath does
something clever on mac...
Odd, though. Given that code, whence bug 56662?
Comment 9•23 years ago
|
||
hm... per
http://lxr.mozilla.org/seamonkey/source/uriloader/exthandler/mac/nsOSHelperAppService.cpp#173
the mac code doesn't do anything clever, just does an InitWithPath on a new
ILocalFile...
>Odd, though. Given that code, whence bug 56662?
see comment in that bug
| Assignee | ||
Comment 10•23 years ago
|
||
Ah, so this code is just broken-as-designed on the mac. Fun.
Comment 11•23 years ago
|
||
ccarlen is the nsLocalFileOSX guru
Comment 12•22 years ago
|
||
ok. bug 166369 demonstrated that this code must be callable from
nsExternalHelperAppService (i.e. the base class) - it must have a way to get
from the RDF datasource literal to an nsILocalFile.
as this function a) searches the path (at least on unix) and b) tries both CFM
and unix paths on OSX, this can't be implemented in an xp way in the base class.
I hence disagree with bz in bug 145860 comment 33 ("no one but the child classes
should be calling it anyway"). this also means that I'd like this bug to be WONTFIX.
does someone have complaints about that?
| Assignee | ||
Comment 13•22 years ago
|
||
No, that's ok... Sucks for BeOS because of the string conversions involved, but
that's life.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
Comment 14•22 years ago
|
||
verified
beos could of course add a private/protected version of getfiletokenforpath that
takes an utf8 string and call that from SetMIMEInfoForType (and from
GetFileTokenForPath)... but that would be another bug.
Status: RESOLVED → VERIFIED
Updated•10 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•