Author: adietish
Date: 2012-01-20 04:23:42 -0500 (Fri, 20 Jan 2012)
New Revision: 37992
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
Log:
[JBIDE-10479] switched GitIgnore to acces .gitignore-file by the resource API (was:
java.io.File)
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java 2012-01-20
01:58:24 UTC (rev 37991)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java 2012-01-20
09:23:42 UTC (rev 37992)
@@ -90,7 +90,11 @@
builder.append(entry);
builder.append(NL);
}
- file.setContents(new ByteArrayInputStream(builder.toString().getBytes()),
IResource.FORCE, monitor);
+ if (!file.exists()) {
+ file.create(new ByteArrayInputStream(builder.toString().getBytes()), IResource.FORCE,
monitor);
+ } else {
+ file.setContents(new ByteArrayInputStream(builder.toString().getBytes()),
IResource.FORCE, monitor);
+ }
return file;
}