# [EGIT PATCH] Change GitResourceDecorator to use isAccessible

2 messages from 2008-08-29 to 2008-08-29. Participants: Shawn O. Pearce, Robin Rosenberg.
Thread: https://gitlist.dev/t/15267

## Shawn O. Pearce, 2008-08-29 00:08

Subject: [EGIT PATCH] Change GitResourceDecorator to use isAccessible
Message-ID: <1219968506-30437-1-git-send-email-spearce@spearce.org>
URL: https://gitlist.dev/e/1219968506-30437-1-git-send-email-spearce%40spearce.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

```

## Robin Rosenberg, 2008-08-29 09:01

Subject: Re: [EGIT PATCH] Change GitResourceDecorator to use isAccessible
Message-ID: <200808291101.06253.robin.rosenberg.lists@dewire.com>
URL: https://gitlist.dev/e/200808291101.06253.robin.rosenberg.lists%40dewire.com
In-Reply-To: <1219968506-30437-1-git-send-email-spearce@spearce.org>

```
fredagen den 29 augusti 2008 02.08.26 skrev Shawn O. Pearce:
> 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.  :-|

Thanks. I had a fix, but noticed the attribution was wrong so I fixed
the patch again and forgot the fix.

-- robin

```
