### Eclipse Workspace Patch 1.0 #P org.eclipse.core.resources Index: src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java,v retrieving revision 1.132 diff -u -r1.132 FileSystemResourceManager.java --- src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java 31 Mar 2011 10:40:47 -0000 1.132 +++ src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java 5 May 2011 14:56:46 -0000 @@ -752,22 +752,24 @@ public InputStream read(IFile target, boolean force, IProgressMonitor monitor) throws CoreException { IFileStore store = getStore(target); - final IFileInfo fileInfo = store.fetchInfo(); - if (!fileInfo.exists()) { - asyncRefresh(target); - if (!force) { - String message = NLS.bind(Messages.localstore_fileNotFound, store.toString()); - throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, target.getFullPath(), message, null); + if (lightweightAutoRefreshEnabled || !force) { + final IFileInfo fileInfo = store.fetchInfo(); + if (!fileInfo.exists()) { + asyncRefresh(target); + if (!force) { + String message = NLS.bind(Messages.localstore_fileNotFound, store.toString()); + throw new ResourceException(IResourceStatus.FAILED_READ_LOCAL, target.getFullPath(), message, null); + } } - } - ResourceInfo info = ((Resource) target).getResourceInfo(true, false); - int flags = ((Resource) target).getFlags(info); - ((Resource) target).checkExists(flags, true); - if (fileInfo.getLastModified() != info.getLocalSyncInfo()) { - asyncRefresh(target); - if (!force) { - String message = NLS.bind(Messages.localstore_resourceIsOutOfSync, target.getFullPath()); - throw new ResourceException(IResourceStatus.OUT_OF_SYNC_LOCAL, target.getFullPath(), message, null); + ResourceInfo info = ((Resource) target).getResourceInfo(true, false); + int flags = ((Resource) target).getFlags(info); + ((Resource) target).checkExists(flags, true); + if (fileInfo.getLastModified() != info.getLocalSyncInfo()) { + asyncRefresh(target); + if (!force) { + String message = NLS.bind(Messages.localstore_resourceIsOutOfSync, target.getFullPath()); + throw new ResourceException(IResourceStatus.OUT_OF_SYNC_LOCAL, target.getFullPath(), message, null); + } } } return store.openInputStream(EFS.NONE, monitor);