[vhffs-dev] [1426] Shorter and safer fix for #0000262 on SVN repo |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1426
Author: beuss
Date: 2009-06-03 14:15:31 +0200 (Wed, 03 Jun 2009)
Log Message:
-----------
Shorter and safer fix for #0000262 on SVN repo
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Robots/Svn.pm
Modified: trunk/vhffs-api/src/Vhffs/Robots/Svn.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Svn.pm 2009-06-03 09:53:15 UTC (rev 1425)
+++ trunk/vhffs-api/src/Vhffs/Robots/Svn.pm 2009-06-03 12:15:31 UTC (rev 1426)
@@ -170,21 +170,9 @@
return -1 unless defined $svn;
my $dir = $svn->get_dir;
- my $basedir = $svn->get_base_dir;
- $basedir =~ s/\/$//;
-
- while(1) {
- print "Removing $dir\n";
- File::Path::rmtree($dir);
- $dir = dirname($dir);
- print "New dir is: $dir\n";
- last if($dir eq $basedir);
- opendir DIR, $dir;
- my @files = readdir DIR;
- closedir DIR;
- # Exit if we've more than . and ..
- last if(scalar(@files) != 2);
- }
+ File::Path::rmtree($dir);
+ my $group_dir = dirname($dir);
+ rmdir $group_dir;
return 0;
}