Browse Source

Don't try to create or delete scan dir if no user has been passed

tags/ipasserelle-base-0.2.69-1
Daniel Berteaud 1 year ago
parent
commit
a3bfaa2126
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      root/etc/e-smith/events/actions/share-modify-scan

+ 2
- 2
root/etc/e-smith/events/actions/share-modify-scan View File

@@ -14,7 +14,7 @@ my $name = $ARGV [1];

die "Event name missing\n" unless (defined $event);

if ($event eq 'user-create'){
if ($event eq 'user-create' and defined $name){
mkpath "/home/e-smith/files/scan/$name";
system ("$setfacl",
'-m',
@@ -22,7 +22,7 @@ if ($event eq 'user-create'){
'--',
"/home/e-smith/files/scan/$name");
}
elsif ($event eq 'user-delete'){
elsif ($event eq 'user-delete' and defined $name){
rmtree "/home/e-smith/files/scan/$name";
}
else {


Loading…
Cancel
Save