Files can't be created in "My Documents" folder

Hi,

I am facing a funny problem and have to resolve a critical bug related to this. I am not been able to create files in 揗y Documents? 揗y Videos?or 揗y Music?folders as canWrite() method is returning false. Whereas if I create a folder in any of the above folder say 搮\\MyDocuments\\My eBooks?then canWrite() method returns true and allows me to write file. I have checked the file Permission on above folders and it is writable. My OS is Windows XP. Can anyone help me on this? Thanks in advance.

You can refer to the following code:

--

import java.io.*;

class ReadWriteCheck

{

public static void main(String[] args)

{

File file1 = new File("C:\\Documents and Settings\\udayan_khattry\\My Documents"); // System folder

File file2 = new File("C:\\Documents and Settings\\udayan_khattry\\My Documents\\My Music"); // System folder

File file3 = new File("C:\\Documents and Settings\\udayan_khattry\\My Documents\\My Videos"); // System folder

File file4 = new File("C:\\Documents and Settings\\udayan_khattry\\My Documents\\My eBooks"); // User folder

System.out.println(file1.canWrite()); //false

System.out.println(file2.canWrite()); //false

System.out.println(file3.canWrite()); //false

System.out.println(file4.canWrite()); // ture

}

}

-

[1361 byte] By [udayan_khattrya] at [2007-11-27 0:32:36]
# 1
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4939819
dcmintera at 2007-7-11 22:38:28 > top of Java-index,Java Essentials,Java Programming...
# 2
Thanks a lot :)
udayan_khattrya at 2007-7-11 22:38:28 > top of Java-index,Java Essentials,Java Programming...