On 03 Oct 2007, at 02:46, John E. Malmberg wrote:

Jos I. Boumans wrote:
On 09 Sep 2007, at 07:58, John E. Malmberg wrote:
Thanks, applied.
Fix directory cleanup to use catdir() for concatenating directories so that it works on VMS.
Again, a few questions about this patch.
@@ -91,12 +113,15 @@
             next if $file =~ /^\./;  # skip dot files

             my $path = File::Spec->catfile( $dir, $file );
+            $file =~ s/\.dir//i if $^O eq 'VMS';
+            my $dirpath = File::Spec->catdir( $dir, $file );

             ### directory, rmtree it
-            if( -d $path ) {
-                print "Deleting directory '$path'\n" if $verbose;
-                eval { rmtree( $path ) };
- warn "Could not delete '$path' while cleaning up '$dir'" if $@;
+            if( -d $dirpath ) {
+ print "Deleting directory '$dirpath'\n" if $verbose;
+                eval { rmtree( $dirpath ) };
+ warn "Could not delete '$dirpath' while cleaning up '$dir'"
+                    if $@;

             ### regular file
             } else {
What's the $file =~ meant to do? Why does regular $path not work? and why are we leaving $path? Is this the type of patch we might need to do else
where as well?

A directory name on VMS in VMS format ends with .dir when it is referenced as a file.

Thanks for explaining -- this hunk is applied too.

--
  Jos Boumans

  How do I prove I'm not crazy to people who are?




Reply via email to