Community
Participate
Working Groups
Build ID: I20090611-1540 Steps To Reproduce: 1.Create a project: Choose the File->New -> Project... ->General->Project wizard 2.Uncheck the "use Default location 3.Browse and select a read only directory 4.Add a project name 5.Select finish and now an error dialog is raised If in step 1 has been chosen a C (C++) project the step 5 is silent, thus the is not aware of the problem More information: I think the user should be advised that the directory selected has not write access, this advise should not be dependent on the project wizard chosen. I added an attempt of a patch for org.eclipse.core.resources plugin any advise is welcome
Created attachment 142900 [details] patch for org.eclipse.core.resources
Thanks Salvatore for looking at this. You see the problem on Linux, right? Instead of creating a temporary file, we could check the resource attributes, see IResource#getResourceAttributes().
I'm not sure if this is still the case, but at one point it was possible to create a project in a read only directory, such as on a CD/DVD, as long as the project location already contained a .project file. It seems like a strange case but we have had requests to support this before. It may be an option to return a warning instead of an error.
(In reply to comment #3) > I'm not sure if this is still the case, but at one point it was possible to > create a project in a read only directory, such as on a CD/DVD, as long as the > project location already contained a .project file. It seems like a strange > case but we have had requests to support this before. It may be an option to > return a warning instead of an error. > Sorry for the late answer to your remarks Szymon: If I understood IResource objects are workspace resources, in this case the folder is not part of the workspace. If not please could you point me to the right solution/example? John: I was not aware of this "feature". Howevetr anything I return from the validateProjectLocationURI is used to create and "error". I did not find a way to set just a warning. Any suggestion is welcome thanks
Salvatore, by "read only" do you mean folder attribute (like hidden) or security permissions allowing only read and denying write access?
(In reply to comment #5) > Salvatore, by "read only" do you mean folder attribute (like hidden) or > security permissions allowing only read and denying write access? I mean the "read only" access right as provided in Linux OS. Under windows, you can emulate the same behaviour playing with Security Permission settings
Created attachment 182059 [details] Patch v.0.1 I think this is something that Szymon B. had on mind. Unfortunately, it does not work in my case (WinXP). I am not sure if this is a problem with implementation of the patch or I tested it in the wrong way. Any comments are welcome.
(In reply to comment #7) > I think this is something that Szymon B. had on mind. Unfortunately, it does > not work in my case (WinXP). I am not sure if this is a problem with > implementation of the patch or I tested it in the wrong way. Any comments are > welcome. As John mentioned, we are able to create projects in read-only locations, if .project is already there. I think we do the right thing now, I'm just not sure why we don't see the error on C/C++ project creation. I would move it to CDT.
Created attachment 183433 [details] CDT exception In CDT trying to create a project on a read-only filesystem silently logs an error to the error log. We should probably behave better and display an error dialog like the platform does.