Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2007-06-21 15:42:48 +0000
committerMichael Valenta2007-06-21 15:42:48 +0000
commitf10b84d9bc5272712ea2b6f2f1016eee4b485fbf (patch)
tree80e51c7fa7bdc806aeeb5db2dc848b0a0aca7e42 /bundles
parent3994c9229036710914466c9d166613f987b25b73 (diff)
downloadeclipse.platform.team-f10b84d9bc5272712ea2b6f2f1016eee4b485fbf.tar.gz
eclipse.platform.team-f10b84d9bc5272712ea2b6f2f1016eee4b485fbf.tar.xz
eclipse.platform.team-f10b84d9bc5272712ea2b6f2f1016eee4b485fbf.zip
Bug 189304 [Sync Info] cvsignore lines should be split on whitespace
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
index 29092aacc..d4666c61a 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/SyncFileWriter.java
@@ -269,7 +269,26 @@ public class SyncFileWriter {
public static String[] readCVSIgnoreEntries(IContainer folder) throws CVSException {
IFile ignoreFile = folder.getFile(new Path(IGNORE_FILE));
if (ignoreFile != null) {
- return readLines(ignoreFile);
+ String[] lines = readLines(ignoreFile);
+ if (lines == null)
+ return null;
+ // Split each line on spaces and tabs.
+ ArrayList/*<String>*/ entries = new ArrayList/*<String>*/();
+ for (int ln = 0; ln < lines.length; ln++) {
+ String line = lines[ln];
+ int pos = 0;
+ while (pos < line.length()) {
+ if (line.charAt(pos) == ' ' || line.charAt(pos) == '\t')
+ pos++;
+ else {
+ int start = pos;
+ while (pos < line.length() && line.charAt(pos) != ' ' && line.charAt(pos) != '\t')
+ pos++;
+ entries.add(line.substring(start, pos));
+ }
+ }
+ }
+ return (String[]) entries.toArray(new String[entries.size()]);
}
return null;
}

Back to the top