Docker skip hidden files when listing directories

Solves the problem with dockerMan pumping out tons of simpleXML errors when a Mac creates its ._ files

See https://lime-technology.com/forums/topic/70636-beta-diskspeed-hard-drive-benchmarking-unraid-6/?page=5&tab=comments#comment-653133  (Hasn't really appeared prior because this template was originally published as a .xml the user had to copy manually onto the flash drive)
This commit is contained in:
Squidly271
2018-04-23 20:39:37 -04:00
committed by GitHub
parent 1a51938381
commit 1b9997f86f
@@ -72,6 +72,7 @@ class DockerTemplates {
foreach ($iter as $path => $fileinfo) {
$fext = $fileinfo->getExtension();
if ($ext && $ext != $fext) continue;
if (substr(basename($path),0,1) == ".") continue;
if ($fileinfo->isFile()) $paths[] = ['path' => $path, 'prefix' => basename(dirname($path)), 'name' => $fileinfo->getBasename(".$fext")];
}
return $paths;