Skip to content

Commit bb221b4

Browse files
committed
Merge remote-tracking branch 'local/MC-40739' into PRodubovyk20210225
2 parents 45f27d6 + 1cb4a57 commit bb221b4

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

lib/internal/Magento/Framework/Backup/AbstractBackup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function setRootDir($rootDir)
160160
);
161161
}
162162

163-
$this->_rootDir = $rootDir;
163+
$this->_rootDir = rtrim($rootDir, '/');
164164
return $this;
165165
}
166166

@@ -181,7 +181,7 @@ public function getRootDir()
181181
*/
182182
public function setBackupsDir($backupsDir)
183183
{
184-
$this->_backupsDir = $backupsDir;
184+
$this->_backupsDir = rtrim($backupsDir, '/');
185185
return $this;
186186
}
187187

lib/internal/Magento/Framework/Backup/Filesystem.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ public function getIgnorePaths()
249249
*/
250250
public function setBackupsDir($backupsDir)
251251
{
252+
$backupsDir = rtrim($backupsDir, '/');
252253
parent::setBackupsDir($backupsDir);
253254
$this->addIgnorePaths($backupsDir);
254255
return $this;

lib/internal/Magento/Framework/Backup/Test/Unit/MediaTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ public function testAction($action)
114114
'rollBackFs' => $this->fsMock,
115115
]
116116
);
117-
$model->setRootDir($rootDir);
118-
$model->setBackupsDir($rootDir);
117+
$model->setRootDir($rootDir . '/');
118+
$model->setBackupsDir($rootDir . '/');
119119
$model->{$action}();
120120
$this->assertTrue($model->getIsSuccess());
121121

lib/internal/Magento/Framework/Backup/Test/Unit/NomediaTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ public function testAction($action)
113113
'rollBackFs' => $this->fsMock,
114114
]
115115
);
116-
$model->setRootDir($rootDir);
117-
$model->setBackupsDir($rootDir);
116+
$model->setRootDir($rootDir . '/');
117+
$model->setBackupsDir($rootDir . '/');
118118
$model->{$action}();
119119
$this->assertTrue($model->getIsSuccess());
120120

lib/web/mage/adminhtml/backup.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,12 @@ define([
7070
* request backup options.
7171
*/
7272
requestBackupOptions: function () {
73-
var action;
74-
7573
this.hidePopups();
76-
action = this.type != 'snapshot' ? 'hide' : 'show'; //eslint-disable-line eqeqeq
7774
this.showPopup('backup-options');
7875

79-
$$('#exclude-media-checkbox-container').invoke(action);
76+
if (this.type === 'snapshot') {
77+
jQuery('#exclude-media-checkbox-container').removeClass('no-display');
78+
}
8079
},
8180

8281
/**

0 commit comments

Comments
 (0)