git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[EGIT PATCH] Change GitResourceDecorator to use isAccessible

From
Shawn O. Pearce <spearce@spearce.org>
Date
Aug 29, 2008, 00:08 UTC
Message-ID
<1219968506-30437-1-git-send-email-spearce@spearce.org>

f3a6ac20 says it switched to use isAccessible() here but it changed to exists(). We can only use setSessionProperty if the resource is accessible so we must use the correct test here in order to fix the issue reported by Robert.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 I just pushed this out to master since you clearly meant
 for this to be the case.  :-|
 .../internal/decorators/GitResourceDecorator.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
index 7c10ec6..1055fcc 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
@@ -199,7 +199,7 @@ synchronized (resources) {
 	} // End ResCL
 
 	void clearDecorationState(IResource r) throws CoreException {
-		if (r.exists()) {
+		if (r.isAccessible()) {
 			r.setSessionProperty(GITFOLDERDIRTYSTATEPROPERTY, null);
 			fireLabelProviderChanged(new LabelProviderChangedEvent(this, r));
 		}
-- 
1.6.0.174.gd789c
Next: Robin Rosenberg
Message 1 of 2 in “Change GitResourceDecorator to use isAccessible”
  1. Change GitResourceDecorator to use isAccessibleShawn O. Pearce, Aug 29, 2008
  2. Robin RosenbergAug 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.