Bug 217673 Adding linked resources calls teamprovider validateEdit after trying to write to the .project file
diff --git a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
index 2e413da..6d3ee77 100644
--- a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.resources; singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 3.3.1.qualifier
 Bundle-Activator: 
  org.eclipse.core.resources.ResourcesPlugin
 Bundle-Vendor: %providerName
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
index f2fc775..c6053d2 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -465,11 +465,14 @@
 				return false;
 		}
 		ByteArrayInputStream in = new ByteArrayInputStream(newContents);
-		IFileInfo fileInfo = ((Resource) descriptionFile).getStore().fetchInfo();
+		IFileStore descriptionFileStore = ((Resource) descriptionFile).getStore();
+		IFileInfo fileInfo = descriptionFileStore.fetchInfo();
 		if (fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY)) {
 			IStatus result = getWorkspace().validateEdit(new IFile[] {descriptionFile}, null);
 			if (!result.isOK())
 				throw new ResourceException(result);
+			// re-read the file info in case the file attributes were modified	
+			fileInfo = descriptionFileStore.fetchInfo();
 		}
 		//write the project description file (don't use API because scheduling rule might not match)
 		write(descriptionFile, in, fileInfo, IResource.FORCE, false, Policy.monitorFor(null));