A regular rename coe call can fail if it crosses filesystems, so try the mv command as well http://virtualmin.com/node/37524

This commit is contained in:
Jamie Cameron
2015-07-28 22:08:25 -07:00
parent ef01659b5b
commit 838f90c8d7

View File

@@ -2958,7 +2958,7 @@ sub rename_as_mail_user
{
my ($oldfile, $newfile) = @_;
my $switched = &switch_to_mail_user();
my $rv = rename($oldfile, $newfile);
my $rv = &rename_file($oldfile, $newfile);
if ($switched) {
$) = 0;
$> = 0;