[Jslib] Problem with File.open('w')
brian at mozdev.org
Fri Jul 30 17:16:14 EDT 2004
On 30.7.2004 15:54, Sudhakar Chandra wrote:
> As you can see, it is pretty simple code. If the file does not exist,
> the code is creating the file just fine. The problem happens when
> opening the file for writing. open() returns false and my code goes
> into the else branch and prints "Unable to write...".
> Any ideas on how I can debug this? Its is very possible that there is
> something wrong with my particular installation of Mozilla because I had
> trouble with my cookies not getting written to cookies.txt.
Check the file and directory permissions that are being written to.
When creating the file, you can do like so to get the right permissions:
localFile.create( 0755 );
www.mozdev.org - free project hosting for the mozilla community
More information about the Jslib