fix: AddDisk with no driver name

#449 .
This commit is contained in:
qkqpttgf
2021-10-20 09:49:55 +08:00
committed by GitHub
parent 04721295fa
commit d4adc8233e
+4
View File
@@ -262,6 +262,10 @@ function main($path)
// Add disk
if (isset($_GET['AddDisk'])) {
if ($_GET['AddDisk']===true) {
$tmp = path_format($_SERVER['base_path'] . '/' . $path);
return output('Please visit <a href="' . $tmp . '">' . $tmp . '</a>.', 301, [ 'Location' => $tmp ]);
}
if ($_SERVER['admin']) {
if (!class_exists($_GET['AddDisk'])) require 'disk' . $slash . $_GET['AddDisk'] . '.php';
$drive = new $_GET['AddDisk']($_GET['disktag']);