Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4f9f364e
Commit
4f9f364e
authored
Aug 20, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 208714: Make checksetup.pl move $datadir/template when it can't delete it
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
parent
b473ef93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
Template.pm
Bugzilla/Template.pm
+12
-9
strings.txt.pl
template/en/default/setup/strings.txt.pl
+5
-0
No files found.
Bugzilla/Template.pm
View file @
4f9f364e
...
...
@@ -792,17 +792,20 @@ sub precompile_templates {
if
(
-
e
"$datadir/template"
)
{
print
install_string
(
'template_removing_dir'
)
.
"\n"
if
$output
;
# XXX This frequently fails if the webserver made the files, because
# then the webserver owns the directories. We could fix that by
# doing a chmod/chown on all the directories here.
# This frequently fails if the webserver made the files, because
# then the webserver owns the directories.
rmtree
(
"$datadir/template"
);
# Check that the directory was really removed
if
(
-
e
"$datadir/template"
)
{
print
"\n\n"
;
print
"The directory '$datadir/template' could not be removed.\n"
;
print
"Please remove it manually and rerun checksetup.pl.\n\n"
;
exit
;
# Check that the directory was really removed, and if not, move it
# into data/deleteme/.
if
(
-
e
"$datadir/template"
)
{
print
STDERR
"\n\n"
,
install_string
(
'template_removal_failed'
,
{
datadir
=>
$datadir
}),
"\n\n"
;
mkpath
(
"$datadir/deleteme"
);
my
$random
=
generate_random_password
();
rename
(
"$datadir/template"
,
"$datadir/deleteme/$random"
)
or
die
"move failed: $!"
;
}
}
...
...
template/en/default/setup/strings.txt.pl
View file @
4f9f364e
...
...
@@ -145,6 +145,11 @@ EOT
*
top
of
the
displayed
list
.
*
EOT
template_precompile
=>
"Precompiling templates..."
,
template_removal_failed
=>
<<
END
,
WARNING:
The
directory
'##datadir##/template'
could
not
be
removed
.
It
has
been
moved
into
'##datadir##/deleteme'
,
which
should
be
deleted
manually
to
conserve
disk
space
.
END
template_removing_dir
=>
"Removing existing compiled templates..."
,
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment