summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/Filesystem.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Install/Filesystem.pm')
-rw-r--r--Bugzilla/Install/Filesystem.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index 63cff1e21..2a000acae 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -355,9 +355,9 @@ sub update_filesystem {
# Move the testfile if we can't write to it, so that we can re-create
# it with the correct permissions below.
- if (!-w "$datadir/mailer.testfile") {
- _rename_file("$datadir/mailer.testfile",
- "$datadir/mailer.testfile.old");
+ my $testfile = "$datadir/mailer.testfile";
+ if (-e $testfile and !-w $testfile) {
+ _rename_file($testfile, "$testfile.old");
}
_create_files(%files);