Index: /trunk/Nebulous-Server/scripts/dirize.pl
===================================================================
--- /trunk/Nebulous-Server/scripts/dirize.pl	(revision 24507)
+++ /trunk/Nebulous-Server/scripts/dirize.pl	(revision 24508)
@@ -48,7 +48,9 @@
 # completely reset the directory table
 $db->do("DELETE FROM directory");
-$db->do("ALTER TABLE directiry AUTO_INCREMENT = 1");
+$db->do("ALTER TABLE directory AUTO_INCREMENT = 1");
+# make sure these duplicates can't happen again
+$db->do("alter table directory add unique key(dirname,parent_id)");
 # seed the root ('/') directory
-$db->do("INSERT INTO directory VALUES(1, '/', 1");
+$db->do("INSERT INTO directory VALUES(1, '/', 1)");
 
 my $i = 0;
@@ -66,5 +68,5 @@
     $db->commit;
     printf("### COMMIT ###\n");
-    $query->finish;
+    $work_query->finish;
     printf("dirized $i\n");
 }
