Community
Participate
Working Groups
I keep getting those errors. java.io.FileNotFoundException: /.pkglist (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:209) at java.io.FileWriter.<init>(FileWriter.java:107) at org.eclipse.linuxtools.rpm.ui.editor.RpmPackageBuildProposalsJob.retrievePackageList(RpmPackageBuildProposalsJob.java:150) at org.eclipse.linuxtools.rpm.ui.editor.RpmPackageBuildProposalsJob.run(RpmPackageBuildProposalsJob.java:59) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Created attachment 174532 [details] Bugfix This should fix the problem. Previously system property "user.dir". See http://www.mindspring.com/~mgrand/java-system-properties.htm what that means. I think user.home should be used. Thanks!
System.getProperty("user.dir") returned "/" on my machine.
(In reply to comment #2) > System.getProperty("user.dir") returned "/" on my machine. OK, now I think I know what is going on. Since I launched Eclipse by clicking on the Eclipse icon on a gnome-panel current working directory seemed to evaluate to "/" (I don't know why exactly). I may be wrong with this, but System.getProperty("user.dir") returns the user's CWD. See: http://download.oracle.com/docs/cd/E17476_01/javase/1.5.0/docs/api/java/lang/System.html#getProperties%28%29 This might evaluate to some unexpected paths. Here are steps to reproduce: 1. Open terminal 2. $ cd / 3. $ eclipse 4. When a spec file is opened and the updating mechanism of packages list kicks in, there should pop up an error as described above. Compare this to: 1. Open terminal 2. $ cd ~ 3. $ eclipse 4. No permission denied errors should occur, since when eclipse was started PWD was '~', which is writable. IMO it would make more sense to use the "user.home" property instead of "user.dir", since it's not sensitive to the user's CWD when eclipse starts up. Thoughts?
"user.home" should be used here, IMO.
Thanks applied in r25289.