]> git.p6c8.net - selfforum.git/blobdiff - selfforum-cgi/shared/Arc/Archive.pm
now the (new) purge method of the lock file is called after removing a thread file
[selfforum.git] / selfforum-cgi / shared / Arc / Archive.pm
index ef2cee5b0b33116bd938a09fba0f4be95010a2dd..7fe742453fefabf6b06f0d41bdcd1bbce26f811d 100644 (file)
@@ -13,7 +13,6 @@ package Arc::Archive;
 use strict;
 use vars qw(
   @EXPORT
 use strict;
 use vars qw(
   @EXPORT
-  $VERSION
 );
 
 use Arc::Test;
 );
 
 use Arc::Test;
@@ -325,7 +324,7 @@ sub append_threads ($$) {
   #
   my $saved = save_file (
     $file => create_forum_xml_string (
   #
   my $saved = save_file (
     $file => create_forum_xml_string (
-      $threads,
+      $thash,
       {
         dtd         => 'forum.dtd',
         lastMessage => 0,
       {
         dtd         => 'forum.dtd',
         lastMessage => 0,
@@ -516,12 +515,13 @@ sub cut_tail ($) {
                 delete $obsolete{$_};
               }
               else {
                 delete $obsolete{$_};
               }
               else {
-                unless (unlink ($param->{messagePath}."t$_.xml")) {
+                my $tfile = new Lock ($param->{messagePath}."t$_.xml");
+                unless (unlink ($tfile->filename)) {
                   $failed{$_} = 'warning: could not delete thread file';
                 }
                 else {
                   push @removed => $_;
                   $failed{$_} = 'warning: could not delete thread file';
                 }
                 else {
                   push @removed => $_;
-                  #file_removed ($param->{messagePath}."t$_.xml");
+                  $tfile -> purge;
                 }
               }
             }
                 }
               }
             }

patrick-canterino.de