mirror of
https://github.com/unraid/webgui.git
synced 2026-01-07 10:10:05 -06:00
Shares: improved empty folder checking
This commit is contained in:
@@ -14,8 +14,7 @@
|
||||
$docroot = $docroot ?? $_SERVER['DOCUMENT_ROOT'] ?: '/usr/local/emhttp';
|
||||
|
||||
if (isset($_POST['scan'])) {
|
||||
$scan = $_POST['scan'];
|
||||
die(is_dir("/mnt/user/$scan") ? (count(scandir("/mnt/user/$scan",SCANDIR_SORT_NONE))<=2 ? '1' : '0') : '1');
|
||||
die((new \FilesystemIterator("/mnt/user/{$_POST['scan']}"))->valid() ? '0' : '1');
|
||||
}
|
||||
|
||||
// add translations
|
||||
|
||||
Reference in New Issue
Block a user