Fixed: Windows unable to extract diagnostics zip file

This commit is contained in:
bergware
2016-10-08 20:56:02 +02:00
parent 31dc794e3a
commit e97aefdd79

View File

@@ -19,6 +19,7 @@ $cli = empty($zip);
$get = "/var/local/emhttp";
$var = file_exists("$get/var.ini") ? parse_ini_file("$get/var.ini") : [];
$docroot = $docroot ?: @$_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
$folders = ['/boot','/boot/config','/boot/config/plugins','/boot/extra','/boot/syslinux','/var/log','/var/log/plugins','/var/log/packages','/tmp'];
function anonymize($text,$select) {
@@ -170,8 +171,8 @@ if ($qemu) {
file_put_contents("/$diag/qemu/no qemu log files","");
// create SMART reports (suppress errors)
$disks = file_exists("$get/disks.ini") ? parse_ini_file("$get/disks.ini", true) : [];
include_once '/usr/local/emhttp/webGui/include/CustomMerge.php';
exec("ls -l /dev/disk/by-id/[asun]* 2>/dev/null|sed '/-part/d;s:^.*/by-id/[^-]*-::;s:-> ../../::'", $devices);
include_once "$docroot/webGui/include/CustomMerge.php";
exec("ls -l /dev/disk/by-id/[asun]* 2>/dev/null|sed '/-part/d;s|^.*/by-id/[^-]*-||;s|-> ../../||;s|:|-|'", $devices);
foreach ($devices as $device) {
list($name,$dev) = explode(' ',$device);
$type = '';