Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1722


Ignore:
Timestamp:
04/30/09 14:12:40 (16 years ago)
Author:
gkronber
Message:

Fixed a bug in old deserialization code (#339).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.2/PersistenceManager.cs

    r1714 r1722  
    152152      doc.Load(stream);
    153153      XmlNode rootNode = doc.ChildNodes[1];
    154       if(rootNode.Name == "Root" && rootNode.ChildNodes.Count == 2) {
     154      if(rootNode.Name == "Root") {
     155        XmlNode bodyNode;
     156        if (rootNode.ChildNodes.Count == 2) bodyNode = rootNode.ChildNodes[1];
     157        else bodyNode = rootNode.ChildNodes[0];
    155158        // load documents that have a list of necessary plugins at the top
    156         return PersistenceManager.Restore(rootNode.ChildNodes[1], new Dictionary<Guid, IStorable>());
     159        return PersistenceManager.Restore(bodyNode, new Dictionary<Guid, IStorable>());
    157160      } else {
    158161        // compatibility to load documents without list of necessary plugins
Note: See TracChangeset for help on using the changeset viewer.