[LON-CAPA-cvs] cvs: loncom /debugging_tools dump_db.pl

albertel lon-capa-cvs-allow@mail.lon-capa.org
Wed, 25 Jul 2007 17:43:35 -0000


albertel		Wed Jul 25 13:43:35 2007 EDT

  Modified files:              
    /loncom/debugging_tools	dump_db.pl 
  Log:
  - properly unti non lonUsers db files
  
  
Index: loncom/debugging_tools/dump_db.pl
diff -u loncom/debugging_tools/dump_db.pl:1.7 loncom/debugging_tools/dump_db.pl:1.8
--- loncom/debugging_tools/dump_db.pl:1.7	Tue Aug  8 14:20:50 2006
+++ loncom/debugging_tools/dump_db.pl	Wed Jul 25 13:43:34 2007
@@ -4,7 +4,7 @@
 #
 # dump_db.pl - dump a GDBM database to standard output, unescaping if asked to.
 #
-# $Id: dump_db.pl,v 1.7 2006/08/08 18:20:50 albertel Exp $
+# $Id: dump_db.pl,v 1.8 2007/07/25 17:43:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -89,7 +89,7 @@
     }
     while (my ($key,$value) = each(%$dbref)) {
         if ($value =~ s/^__FROZEN__//) {
-            #$value = thaw(&unescape($value));
+            $value = thaw(&unescape($value));
         }
         if ($unesc) {
             $key = &unescape($key);
@@ -100,7 +100,11 @@
         }
         print "$key = ".(ref($value)?Dumper($value):$value)."\n";
     }
-    &LONCAPA::locking_hash_untie($dbref);
+    if ($fname =~ m/^\Q$perlvar{'lonUsersDir'}\E/) {
+	&LONCAPA::locking_hash_untie($dbref);
+    } else {
+	untie($dbref);
+    }
 }
 exit;