[vhffs-dev] [2223] fixed duplicate backups of group data for group that were not empty when asked to be deleted

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 2223
Author:   gradator
Date:     2013-01-17 21:59:53 +0100 (Thu, 17 Jan 2013)
Log Message:
-----------
fixed duplicate backups of group data for group that were not empty when asked to be deleted

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Robots/Group.pm

Modified: trunk/vhffs-api/src/Vhffs/Robots/Group.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Robots/Group.pm	2013-01-17 20:50:00 UTC (rev 2222)
+++ trunk/vhffs-api/src/Vhffs/Robots/Group.pm	2013-01-17 20:59:53 UTC (rev 2223)
@@ -90,8 +90,6 @@
 	my $vhffs = $group->get_vhffs;
 	my $dir = $group->get_dir;
 
-	Vhffs::Robots::archive_targz( $group, $dir );
-
 	# Remove users from group
 	foreach( @{$group->get_users} ) {
 		my $usergroup = Vhffs::UserGroup::get_by_user_group( $_, $group );
@@ -116,6 +114,8 @@
 		return 1;
 	}
 
+	Vhffs::Robots::archive_targz( $group, $dir );
+
 	File::Path::remove_tree( $dir, { error => \my $errors });
 	# Group directories are hashed on two levels, so we've potentially two empty directories to delete
 	my $parent = File::Basename::dirname($dir);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/