1 |
diff -up e-smith-samba-2.2.0/root/etc/e-smith/events/actions/user-delete-profiledir.fail-silently-on-non-existent-folder 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.fail-silently-on-non-existent-folder 2010-03-06 16:57:45.000000000 +0100 |
3 |
+++ e-smith-samba-2.2.0/root/etc/e-smith/events/actions/user-delete-profiledir 2010-03-06 16:57:34.000000000 +0100 |
4 |
@@ -36,13 +36,12 @@ unless ( defined $a && $a->prop('type') |
5 |
exit (0); |
6 |
} |
7 |
|
8 |
-my @dirs = ("/home/e-smith/files/samba/profiles/$account" "/home/e-smith/files/samba/profiles/$account.V2"); |
9 |
+my @dirs = ("/home/e-smith/files/samba/profiles/$account", "/home/e-smith/files/samba/profiles/$account.V2"); |
10 |
|
11 |
foreach (@dirs) { |
12 |
|
13 |
- my $existing = ( -d $_ ); |
14 |
- |
15 |
- $existing && rmtree( $_ ) || die "Couldn't remove tree $_\n"; |
16 |
+ next unless -d $_; |
17 |
+ rmtree( $_ ) || die "Couldn't remove tree $_\n"; |
18 |
|
19 |
} |
20 |
|