X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FFilesystems%2FInitRD%2FGenerateInitRD.php;h=44c005abe9ceba9787a74b1e2e24964c3d1a5d2d;hb=1100f7207b40fef763f353d8a0b4c798253cc2d9;hp=5119442521f55d56932c4626858fe13059fbd042;hpb=04a050f42807686dc119838c82372409246d55bb;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php b/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php index 51194425..44c005ab 100644 --- a/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php +++ b/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php @@ -47,8 +47,12 @@ foreach($lines as $line) continue; } // File - if(preg_match('/^File\s+"([^"]+)"\s+"([^"]+)"$/', $line, $matches)) + if(preg_match('/^File\s+"([^"]+)"(?:\s+"([^"]+)")?$/', $line, $matches)) { + if( !isset($matches[2]) ) { + $matches[2] = $matches[1]; + $matches[1] = basename($matches[2]); + } $lStack[$lDepth][1][] = array($matches[1], $matches[2]); continue; }