]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blobdiff - viewer/view_btree.cpp
Muestro los datos borrados y que son recuperables.
[z.facultad/75.52/treemulator.git] / viewer / view_btree.cpp
index d85a909eb1c6acc22e0b0e8077164f611392517e..760429323e512325ed47b7312c30ebd2f8e23506 100644 (file)
@@ -31,7 +31,7 @@ ViewBTree::ViewBTree (Canvas::Group *parent, const std::string filename)
        last_visited = 0;
 }
 
-ViewBTree* Open (Canvas::Group *parent, const std::string &filename)
+ViewBTree* ViewBTree::Open (Canvas::Group *parent, const std::string &filename)
 {
        ViewBTree *tree = new ViewBTree (parent, filename);
 
@@ -40,6 +40,11 @@ ViewBTree* Open (Canvas::Group *parent, const std::string &filename)
                return NULL;
        }
 
+       /* El magic no coincide!! */
+       if (strcmp (tree->header.magic, "DILUMA")) {
+               delete tree;
+               return NULL;
+       }
        return tree;
 }