Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2018-09-17 18:44:40 -0400
committerSam Davis2018-09-17 18:44:40 -0400
commit9a5b3f0ec9f1df19dea4bc4424a06c8564435e6f (patch)
tree5f08ea47d1cb251f45ede54d34666678bf49baf2
parent8c12584aa0b1666866804006c4cd8100e1553a8e (diff)
downloadorg.eclipse.mylyn.tasks-9a5b3f0ec9f1df19dea4bc4424a06c8564435e6f.tar.gz
org.eclipse.mylyn.tasks-9a5b3f0ec9f1df19dea4bc4424a06c8564435e6f.tar.xz
org.eclipse.mylyn.tasks-9a5b3f0ec9f1df19dea4bc4424a06c8564435e6f.zip
Revert "537208: Task data filename can get too long"
This reverts commit 8c12584aa0b1666866804006c4cd8100e1553a8e. There was no migration path for users who had already upgraded to 3.24.2 which would hash long task IDs. The problem is that we check for the presence of a file with the encoded name but not the trimmed encoded name. Change-Id: I0f2358338781bfd80c53d251dc2e2047c1423954
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataFileManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataFileManagerTest.java2
2 files changed, 1 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataFileManager.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataFileManager.java
index e23efc339..3b8fcc7ef 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataFileManager.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/data/TaskDataFileManager.java
@@ -97,7 +97,7 @@ public class TaskDataFileManager {
* @return true or false
*/
private boolean requiresEncoding(String fileName) {
- return !fileName.matches("^[_a-zA-Z0-9%\\.]+$"); //$NON-NLS-1$
+ return !fileName.matches("^[a-zA-Z0-9%\\.]+$"); //$NON-NLS-1$
}
private String trimFilenameIfRequired(String filename) {
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataFileManagerTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataFileManagerTest.java
index d112027ec..9eb169632 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataFileManagerTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataFileManagerTest.java
@@ -38,8 +38,6 @@ public class TaskDataFileManagerTest extends TestCase {
assertEquals("11111%2520", fileManager.getFileName(TaskTestUtil.createMockTask("11111%20"), true));
// <max, does not exist, not requires encoding == not encoded
assertEquals("11111%20", fileManager.getFileName(TaskTestUtil.createMockTask("11111%20"), false));
- // <max, does not exist, not requires encoding == not encoded
- assertEquals("11111%20_", fileManager.getFileName(TaskTestUtil.createMockTask("11111%20_"), false));
// <max, does not exist, requires encoding == encoded
assertEquals("11111%2520%2B", fileManager.getFileName(TaskTestUtil.createMockTask("11111%20+"), false));
// <max, exists, requires encoding == encoded

Back to the top