1 |
snetram |
1.1 |
diff -up e-smith-samba-2.2.0/root/etc/e-smith/events/actions/user-delete-profiledir.refactor-profilev2 e-smith-samba-2.2.0/root/etc/e-smith/events/actions/user-delete-profiledir |
2 |
|
|
--- e-smith-samba-2.2.0/root/etc/e-smith/events/actions/user-delete-profiledir.refactor-profilev2 2010-03-06 10:29:40.000000000 +0100 |
3 |
|
|
+++ e-smith-samba-2.2.0/root/etc/e-smith/events/actions/user-delete-profiledir 2010-03-06 10:36:19.000000000 +0100 |
4 |
|
|
@@ -36,16 +36,14 @@ unless ( defined $a && $a->prop('type') |
5 |
|
|
exit (0); |
6 |
|
|
} |
7 |
|
|
|
8 |
|
|
-my $dir = "/home/e-smith/files/samba/profiles/$account"; |
9 |
|
|
+my @dirs = qq(/home/e-smith/files/samba/profiles/$account /home/e-smith/files/samba/profiles/$account.V2); |
10 |
|
|
|
11 |
|
|
-my $existing = ( -d $dir ); |
12 |
|
|
+foreach (@dirs) { |
13 |
|
|
+ |
14 |
|
|
+ my $existing = ( -d $_ ); |
15 |
|
|
|
16 |
|
|
-$existing && rmtree( $dir ) || die "Couldn't remove tree $dir\n"; |
17 |
|
|
+ $existing && rmtree( $_ ) || die "Couldn't remove tree $_\n"; |
18 |
|
|
|
19 |
|
|
-$dir = "/home/e-smith/files/samba/profiles/${account}.V2"; |
20 |
|
|
- |
21 |
|
|
-my $existing = ( -d $dir ); |
22 |
|
|
- |
23 |
|
|
-$existing && rmtree( $dir ) || die "Couldn't remove tree $dir\n"; |
24 |
|
|
+} |
25 |
|
|
|
26 |
|
|
exit (0); |