Closed Bug 17145 Opened 20 years ago Closed 20 years ago

Need resource URL that hits profile and install directories

Categories

(Core :: Networking, defect, P3)

x86
Other
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: hyatt, Assigned: hyatt)

Details

I need a way to specify a URL that will first check the profile directory and if
the file is not found there then it will check the install directory.  I believe
this functionality should be built in to the resource url and not the chrome
url.
Do you really think that fetching one resource URL should cause this iteration?
That seems a little weird to me because now the URL can't specify one location.
Wouldn't it be better to try to load one of them and if that fails, try the
second?
Ok, I'll do it myself.
Note that I intend to extend the resource: syntax to allow symbolic roots like
the profile directory, or install directory. That should make whatever code you
write not have to deal with platform paths, etc.

Should I add a dependency on that?
Assignee: warren → hyatt
Target Milestone: M11
Back to you Dave...
yes
mass-moving most m11 bugs to m12
Assignee: hyatt → warren
Re-assigning to warren, who can close when his mapping support is online (and
able to hit the profile dir).
Status: NEW → ASSIGNED
I have one last task which is to rename res: to resource: and remove the old
one. I've tried it on Windows and it seems to work fine, but haven't on mac and
unix yet (although I don't expect any problems).

So if you want to try this out, you can use the res: protocol and define a new
root by getting the nsIResProtocolHandler and calling AppendSubstitution twice
for the 2 directories, e.g.:

 resPH->AppendSubstitution("<name>", "res://ProfileDir/");
 resPH->AppendSubstitution("<name>", "res://InstallDir/");

Of course you'll also need to define ProfileDir and InstallDir in the same way
-- I'm not sure where they come from.
Assignee: warren → hyatt
Status: ASSIGNED → NEW
Ok Hyatt -- you can do this now. Let me know if you need more details, or if
you want to tell me where this should go then I can do it. I'd like to code
review whatever you do too.
moving to m13
Target Milestone: M12 → M13
Blocks: 21564
Bulk move of all Necko (to be deleted component) bugs to new Networking

component.
Target Milestone: M13 → M15
moving to m15
Status: NEW → ASSIGNED
Target Milestone: M15 → M16
This is implemented, thanks to warren's resource substitution code.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
No longer blocks: 21564
verified:
winNT 2000070508
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.