Page 1 of 1

RFE: more recognized surrogate replacement URL schemes

Posted: Wed Oct 22, 2014 5:03 pm
by barbaz
I have an add-on that adds a custom resource: URI that is just an alias for a folder in the profile directory, to enable portability of my profile between many different systems (different OSes) that don't have practical common file paths (if any at all) and anyway won't have the files I need. I tried to add a surrogate script to NS with a replacement that pointed to one such resource: URI, and it failed with a syntax error.

So I'd like to make an RFE for script surrogates to work with resource: URIs, in addition to file: URLs.

@Giorgio: if you would like the addon I'm talking about, let me know & I'll send it via PM

Re: RFE: more recognized surrogate replacement URL schemes

Posted: Sat Mar 21, 2015 10:14 pm
by barbaz
Bump.

atm I'm dumping the file: URL surrogates in a subdirectory of /srv... not convenient because I have to manually mirror the surrogate for every VM I want to sync my profile. Ugh.

Another possible idea: how about offering a placeholder for the portion of a file: URL that points to the profile directory, i.e. [ProfD]? It's easy enough to get that in Gecko 18+ with OS.File (like this: )

Code: Select all

Cu.import("resource://gre/modules/osfile.jsm");
let profd = "file://"+OS.Constants.Path.profileDir;
but I wouldn't know how to get it in a way that's compatible with older Gecko...