Changeset 2762


Ignore:
Timestamp:
02/08/10 15:54:00 (11 years ago)
Author:
epitzer
Message:

check temp path, and disable code completion persistence in case of file permission problems (#842)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CodeEditor/3.2/CodeEditor.cs

    r2719 r2762  
    157157
    158158      projectContentRegistry = new Dom.ProjectContentRegistry(); // Default .NET 2.0 registry
    159       projectContentRegistry.ActivatePersistence(Path.Combine(Path.GetTempPath(),
    160                                                   "CSharpCodeCompletion"));
     159      try {
     160        string persistencePath = Path.Combine(Path.GetTempPath(), "HeuristicLab.CodeEditor");
     161        if (!Directory.Exists(persistencePath))
     162          Directory.CreateDirectory(persistencePath);       
     163        File.Create(Path.Combine(persistencePath, "test.tmp"));
     164        File.Delete(Path.Combine(persistencePath, "test.tmp"));
     165        projectContentRegistry.ActivatePersistence(persistencePath);
     166      } catch { }
    161167      projectContent = new Dom.DefaultProjectContent();
    162168      projectContent.Language = Dom.LanguageProperties.CSharp;
Note: See TracChangeset for help on using the changeset viewer.