Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-tool_lifecycle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-tool_lifecycle
Commits
5efdfdbd
Commit
5efdfdbd
authored
5 years ago
by
Tobias Reischmann
Browse files
Options
Downloads
Patches
Plain Diff
Replaced '/' by DIRECTORY_SEPARATOR to also support non-unix systems
parent
7175f5f7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/local/manager/backup_manager.php
+4
-4
4 additions, 4 deletions
classes/local/manager/backup_manager.php
with
4 additions
and
4 deletions
classes/local/manager/backup_manager.php
+
4
−
4
View file @
5efdfdbd
...
...
@@ -75,13 +75,13 @@ class backup_manager {
/* @var $file \stored_file instance of the backup file*/
$file
=
$results
[
'backup_destination'
];
if
(
!
empty
(
$file
))
{
$file
->
copy_content_to
(
$path
.
'/'
.
$archivefile
);
$file
->
copy_content_to
(
$path
.
DIRECTORY_SEPARATOR
.
$archivefile
);
}
$bc
->
destroy
();
unset
(
$bc
);
// First check if the file was created.
if
(
!
file_exists
(
$path
.
'/'
.
$archivefile
))
{
if
(
!
file_exists
(
$path
.
DIRECTORY_SEPARATOR
.
$archivefile
))
{
return
false
;
}
...
...
@@ -110,14 +110,14 @@ class backup_manager {
$backuprecord
=
$DB
->
get_record
(
'tool_lifecycle_backups'
,
array
(
'id'
=>
$backupid
));
// Check if backup tmp dir exists.
$backuptmpdir
=
$CFG
->
tempdir
.
'
/
backup'
;
$backuptmpdir
=
$CFG
->
tempdir
.
DIRECTORY_SEPARATOR
.
'backup'
;
if
(
!
check_dir_exists
(
$backuptmpdir
,
true
,
true
))
{
throw
new
\restore_controller_exception
(
'cannot_create_backup_temp_dir'
);
}
// Create the file location in the backup temp.
$targetfilename
=
\restore_controller
::
get_tempdir_name
(
$backuprecord
->
courseid
,
get_admin
()
->
id
);
$target
=
$backuptmpdir
.
'/'
.
$targetfilename
;
$target
=
$backuptmpdir
.
DIRECTORY_SEPARATOR
.
$targetfilename
;
// Create the location of the actual backup file.
$source
=
get_config
(
'tool_lifecycle'
,
'backup_path'
)
.
DIRECTORY_SEPARATOR
.
$backuprecord
->
backupfile
;
// Check if the backup file exists.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment