threads / patch / 15267

patchChange GitResourceDecorator to use isAccessible

Subject: [EGIT PATCH] Change GitResourceDecorator to use isAccessible

## tl;dr

2 messages between Aug 29, 2008 and Aug 29, 2008. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Shawn O. Pearce· Aug 29, 2008, 00:08 UTC · lore

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(-)
Show changes to org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java +1 −1
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· Aug 29, 2008, 09:01 UTC · re: Shawn O. Pearce · lore

Re: [EGIT PATCH] Change GitResourceDecorator to use isAccessible

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

← back to recent threads