diff options
author | John Arthorne | 2008-02-05 15:03:04 +0000 |
---|---|---|
committer | John Arthorne | 2008-02-05 15:03:04 +0000 |
commit | a137fa9b2c87bab24d707169a275afe346eec8b4 (patch) | |
tree | 9c4da0223aff037b513269d3f04672798b173a74 | |
parent | 6b83c35367107bf518dd226becd626391ac6cbb3 (diff) | |
download | eclipse.platform.resources-R3_3_maintenance.tar.gz eclipse.platform.resources-R3_3_maintenance.tar.xz eclipse.platform.resources-R3_3_maintenance.zip |
Bug 217673 Adding linked resources calls teamprovider validateEdit after trying to write to the .project fileR3_3_2R33x_v20080205R3_3_maintenance
-rw-r--r-- | bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF index 2e413dac4..6d3ee77e1 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 @@ Manifest-Version: 1.0 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 f2fc77513..c6053d229 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 @@ public class FileSystemResourceManager implements ICoreConstants, IManager { 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)); |