diff options
author | Jeff Johnston | 2013-02-19 23:22:07 +0000 |
---|---|---|
committer | Jeff Johnston | 2013-02-20 21:16:50 +0000 |
commit | 18ff30de24e745ca9f221c49ff8bd219837022c7 (patch) | |
tree | a3c29211fc06a2e738b2be12f17057d2d14cd77e /core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui | |
parent | 1908efec3811e8c24030a5b38140b00fbb66ca61 (diff) | |
download | org.eclipse.cdt-18ff30de24e745ca9f221c49ff8bd219837022c7.tar.gz org.eclipse.cdt-18ff30de24e745ca9f221c49ff8bd219837022c7.tar.xz org.eclipse.cdt-18ff30de24e745ca9f221c49ff8bd219837022c7.zip |
Bug 400972: Creating new C/C++ project in existing read-only
directory should be disallowed
Change-Id: I75090498bd4f408d77ad17491f50f4fd66850c97
Reviewed-on: https://git.eclipse.org/r/10404
Reviewed-by: Jesse Weinstein <Jesse.Weinstein@clinicomp.com>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
IP-Clean: Jeff Johnston <jjohnstn@redhat.com>
Tested-by: Jeff Johnston <jjohnstn@redhat.com>
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui')
-rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java index d8b09411ef6..133785d1776 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java @@ -211,7 +211,12 @@ import org.eclipse.cdt.internal.ui.newui.Messages; IFileInfo f = fs.fetchInfo(); if (f.exists()) { if (f.isDirectory()) { - setMessage(Messages.CMainWizardPage_7, IMessageProvider.WARNING); + if (f.getAttribute(EFS.ATTRIBUTE_READ_ONLY)) { + setErrorMessage(Messages.CMainWizardPage_DirReadOnlyError); + return false; + } + else + setMessage(Messages.CMainWizardPage_7, IMessageProvider.WARNING); } else { setErrorMessage(Messages.CMainWizardPage_6); return false; |