* A patch to make TemplateToolkit work properly on templates in the
Nix store. svn path=/nixpkgs/trunk/; revision=13491
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
diff -rc Template-Toolkit-2.20-orig/lib/Template/Provider.pm Template-Toolkit-2.20/lib/Template/Provider.pm
|
||||
*** Template-Toolkit-2.20-orig/lib/Template/Provider.pm 2008-08-06 11:32:02.000000000 +0200
|
||||
--- Template-Toolkit-2.20/lib/Template/Provider.pm 2008-11-28 16:37:36.000000000 +0100
|
||||
***************
|
||||
*** 936,942 ****
|
||||
sub _template_modified {
|
||||
my $self = shift;
|
||||
my $template = shift || return;
|
||||
! return (stat( $template ))[9];
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
--- 936,945 ----
|
||||
sub _template_modified {
|
||||
my $self = shift;
|
||||
my $template = shift || return;
|
||||
! # Nix specific hack: timestamps of 0 (1-1-1970) should not be
|
||||
! # treated as undefined, so return 1 instead.
|
||||
! my $t = (stat( $template ))[9];
|
||||
! return (defined $t && $t == 0) ? 1 : $t;
|
||||
}
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user