I just found a weird failure mode in ttree.
Say I have a destination of /staging/www.foo.com and I have subdirectories
cgi-bin and html.
When ttree runs, directories are made as required. Except when www.foo.com
does not exist. In this case, www.foo.com is made but the first sub
directory is not. ttree does not error, and even seems to copy/process the
contents but the directory is not there. Strange.
This patch to ttree seems to fix it but I suspect there are other edge
cases that may need the call to mkpath to be eval'd.
--- /home/simonw/ttree.old 2004-01-19 18:05:59.000000000 +0000
+++ /usr/local/bin/ttree 2004-01-19 18:49:43.000000000 +0000
@@ -263,8 +263,8 @@
# create target directory if required
$target = "$destdir/$path";
unless (-d $target || $dryrun) {
- mkdir $target, $mode || do {
- warn "mkdir ($target): $!\n";
+ mkpath $target, $mode || do {
+ warn "mkpath ($target): $!\n";
next;
};
# commented out by abw on 2000/12/04 - seems to raise a warning?
Simon.
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates