Bugfix on closing file and clarified documentation
authorBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Thu, 13 Sep 2007 02:23:53 +0000 (02:23 +0000)
committerBarijaona Ramaholimihaso <barijaona@users.sourceforge.net>
Thu, 13 Sep 2007 02:23:53 +0000 (02:23 +0000)
general/entriescache

index 7a0f17bab15d36b2eb1e45600474b428a7686973..3156c57243be0644c6982145bce460c59c3eee86 100644 (file)
@@ -176,6 +176,7 @@ sub entries {
                                                        or !-f "$blosxom::static_dir/$1/index." . $blosxom::static_flavours[0]
 #                                                      or stat("$blosxom::static_dir/$1/index." . $blosxom::static_flavours[0])->mtime < stat($File::Find::name)->mtime
 # Trying to fix for static mode
+# Barijaona's note : you may uncomment the above instruction if you want to be able to fix typos in static rendering
                                                        or stat("$blosxom::static_dir/$1/index." . $blosxom::static_flavours[0])->mtime < $files{$File::Find::name}
                                                )
                                                and $indexes{$1} = 1
@@ -259,6 +260,7 @@ sub extract_date {
                                        
                                        if (($line =~ /\r/) || ($new_story =~ /\r/)) {
                                                warn "Entries_Cache: File $file has non-UNIX line endings; cannot update metatags...\n";
+                                               close FILE;
                                                return 0;
                                        }
                                        
@@ -299,7 +301,7 @@ sub extract_date {
                                        close FILE;
                                        return 0;
                                } else {
-                                       close File;
+                                       close FILE;
                                        return 0;
                                }
                        }