Summary: | Project Creation wizard does not check if folder is read only | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Tools] CDT | Reporter: | Salvatore Culcasi <salvatore.culcasi> | ||||||||
Component: | cdt-core | Assignee: | Project Inbox <cdt-core-inbox> | ||||||||
Status: | NEW --- | QA Contact: | Jonah Graham <jonah> | ||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | jamesblackburn+eclipse, sptaszkiewicz, Szymon.Brandys, yevshif | ||||||||
Version: | 8.0 | Keywords: | helpwanted | ||||||||
Target Milestone: | --- | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Salvatore Culcasi
2009-07-29 11:02:17 EDT
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.
|