Karl Ove Hufthammer wrote:
> 
> Daniel Veditz <[EMAIL PROTECTED]> wrote in message
> <[EMAIL PROTECTED]>:
> 
> >If you're sure it's the right thing, it would be very easy to do...
> >
> > err =
> > addFile("","newbkmark.html",getFolder("Profile"),"bookmarks.html");
> 
> Unfortunately, this doesn't work. The 'bookmarks.html' file is replaced
> (though not used), and when I exit Mozilla, it gets overwritten (by
> Mozilla).
> 
> The same thing happens if you edit 'bookmarks.html' while Mozilla is
> running.

argh.

Prefs have a similar problem, Mozilla will overwrite any change you make. We
have two approaches:

1) create an "edit bookmarks" feature in XPInstall--not any time soon unless
you're volunteering :-)

2) find some hack that will defeat the Mozilla overwrite, then integrate
that into the XPInstall.

My only thought is some kind of native executable that watches the Mozilla
process, and then copies the file over after it goes away. This executable
could then be launched from the XPInstall.

  addFile("","newbkmark.html",getFolder("Profile"),"");
  execute("switcher.exe",getFolder("Profile"));

where switcher in a app that takes the profile dir as an argument, waits for
Mozilla to exit, then copies newbkmark.html over bookmarks.html

I don't know where you'd ask to find bookmark-savvy folks, there may be
other hacks you could do to manipulate bookmarks via XPCOM components. Not
sure how you'd launch something like that from an XPInstall script though.

-Dan Veditz

Reply via email to