summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2012-02-25 05:11:26 (EST)
committer Steffen Pingel2012-02-25 05:11:26 (EST)
commit0327a83facb27aed3e74f2f1feccbd02392f4657 (patch)
treef587a0b712aace8820606259e97d2fdf1a2b0ec4
parent43bc32732ce5e99708e087f13bb8fc2216d3f95d (diff)
downloadorg.eclipse.mylyn.tasks-0327a83facb27aed3e74f2f1feccbd02392f4657.zip
org.eclipse.mylyn.tasks-0327a83facb27aed3e74f2f1feccbd02392f4657.tar.gz
org.eclipse.mylyn.tasks-0327a83facb27aed3e74f2f1feccbd02392f4657.tar.bz2
NEW - bug 358554: ensure that context directory exists
https://bugs.eclipse.org/bugs/show_bug.cgi?id=358554 Change-Id: I5189ddf7c65d6114c4e5d74144b23bb65dc0bf38
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
index 7ae9bc8..fe79f20 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java
@@ -863,6 +863,12 @@ public class TasksUiPlugin extends AbstractUIPlugin {
*/
@SuppressWarnings("restriction")
public void initializeDataSources() {
+ // ensure that context directory exists
+ File storeFile = new File(getDataDirectory(), ITasksCoreConstants.CONTEXTS_DIRECTORY);
+ if (!storeFile.exists()) {
+ storeFile.mkdirs();
+ }
+
taskDataManager.setDataPath(getDataDirectory());
externalizationManager.setRootFolderPath(getDataDirectory());
getContextStore().setDirectory(new File(getDataDirectory(), "tasks")); //$NON-NLS-1$