]> git.treefish.org Git - fex.git/blobdiff - cgi-bin/fac
Original release 20160919
[fex.git] / cgi-bin / fac
index 262975d65912dce9f929fcbc471206560d185526..a6a00120cdfdee1eb22e2861fc36ca8c2605c5ac 100755 (executable)
@@ -205,13 +205,13 @@ if (defined $PARAM{"createUser"}) {
   if ($PARAM{"editUser"} =~ /^#.*/) {
     &editRestrictionsForm;
   } else {
+    $user = normalize_user($PARAM{"editUser"});
     if (defined $PARAM{"delete file"}) {
-      $user = normalize_user($PARAM{"editUser"});
       unlink "$user/\@ALLOWED_RECIPIENTS";
       print "upload restrictions for $user have been deleted\n";
       &end_html;
     } else {
-      editUser($PARAM{"editUser"});
+      editUser($user);
     }
   }
 } elsif ($PARAM{"contentBox"} and $PARAM{"ar"}) {
@@ -564,8 +564,9 @@ sub saveFile {
       &end_html;
     }
   } else {
-    system qw'cp -a',$ar,"$ar~";
+    system 'mv',$ar,"$ar~";
   }
+  $rf =~ s/^\s+$//;
   open $ar,'>',$ar or http_die("cannot write $ar - $!");
   print {$ar} $rf;
   close $ar or http_die("cannot write $ar - $!");;