Fixed the new deletion method. Deleting /a/path will delete /a/path/* also and not...
authorOrtwin Escher <hurz@oe-extern.plan.vfnet.de>
Thu, 28 Jan 2010 15:03:01 +0000 (28 16:03 +0100)
committerLove Hörnquist Åstrand <lha@kth.se>
Thu, 28 Jan 2010 22:10:13 +0000 (28 14:10 -0800)
Signed-off-by: Love Hörnquist Åstrand <lha@kth.se>
git2svn

diff --git a/git2svn b/git2svn
index acad69b..f6e17fe 100755 (executable)
--- a/git2svn
+++ b/git2svn
@@ -346,8 +346,9 @@ COMMAND: while (!eof(IN)) {
                                die "file was a dir";
                    } elsif (($paths{$path} != 2) && ($type == 0120000)) {
                                print STDERR "Dir is now a symlink, deleting: $path\n" if ($verbose);
+                           delete $paths{$path};
                            foreach ( keys( %paths ) ) {
-                       delete $paths{$_} if ( /^$path/ );
+                       delete $paths{$_} if ( /^$path\// );
                                }
                                # This is now a file and not a path anymore
                                $paths{$path} = 2;
@@ -392,8 +393,9 @@ COMMAND: while (!eof(IN)) {
                my $path = $basedir . "/". $1;
 
                if ($paths{$path}) {
+                   delete $paths{$path};
                    foreach ( keys( %paths ) ) {
-               delete $paths{$_} if ( /^$path/ );
+               delete $paths{$_} if ( /^$path\// );
                        }
                    
                    printf OUT "Node-path: $path\n";