directories named '0'

From: Angus Cameron <anguscc@earthlink.net>
Date: Thu Aug 01 2002 - 17:12:53 GMT

Hi, I found a bug that would cause cvs2cl.pl to hang if your cvs module
has a sub directory name is '0' (e.g. mymodule/src/0/foo/bar). Fix
included below.

-Angus

diff -u -r2.39 cvs2cl.pl
--- cvs2cl.pl 29 Jul 2002 13:00:40 -0000 2.39
+++ cvs2cl.pl 1 Aug 2002 17:03:23 -0000
@@ -1226,8 +1226,8 @@
     last if ($accum1 eq $dir1);
     my ($tmp1) = split (/\//, (substr ($dir1, length ($accum1))));
     my ($tmp2) = split (/\//, (substr ($dir2, length ($accum2))));
- $accum1 .= "$tmp1/" if ((defined ($tmp1)) and $tmp1);
- $accum2 .= "$tmp2/" if ((defined ($tmp2)) and $tmp2);
+ $accum1 .= "$tmp1/" if ((defined ($tmp1)) and ($tmp1 ne ""));
+ $accum2 .= "$tmp2/" if ((defined ($tmp2)) and ($tmp2 ne ""));
   }

   return $last_common_prefix;
Received on Fri Aug 2 07:35:01 2002

This archive was generated by hypermail 2.1.8 : Wed Jan 21 2004 - 16:25:33 GMT