mirror of
https://github.com/opnsense/plugins.git
synced 2026-02-03 20:40:37 -05:00
Skip directories when enumerating local files in /conf/backup/
This commit is contained in:
parent
d0374346e2
commit
a8a3acf04d
1 changed files with 4 additions and 1 deletions
|
|
@ -150,11 +150,14 @@ class Nextcloud extends Base implements IBackupProvider
|
|||
// Get list of files from local backup system
|
||||
$local_files = array();
|
||||
$tmp_local_files = scandir('/conf/backup/');
|
||||
// Remove '.' and '..'
|
||||
// Remove '.' and '..', skip directories
|
||||
foreach ($tmp_local_files as $tmp_local_file) {
|
||||
if ($tmp_local_file === '.' || $tmp_local_file === '..') {
|
||||
continue;
|
||||
}
|
||||
if (is_dir("/conf/backup/".$tmp_local_file)) {
|
||||
continue;
|
||||
}
|
||||
$local_files[] = $tmp_local_file;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue