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)

defect

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.
setting weak dependency :)
Blocks: 145860
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
QA Contact: sairuh → petersen
Priority: P3 → P4
Target Milestone: --- → mozilla1.7beta
so... how is GetFileTokenForPath different from NS_NewLocalFile?
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
ok, but in that case, isn't it needed by GetMIMEInfoFromDS?
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.
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?
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
Ah, so this code is just broken-as-designed on the mac. Fun.
ccarlen is the nsLocalFileOSX guru
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?
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
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
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.