refactor(TorrentFileList): Reduce duplication in root directory unset logic (#2027)

This commit is contained in:
Roman Kelesidis 2025-07-02 10:31:07 +03:00 committed by GitHub
parent 57d0d59b53
commit 68403760c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -53,8 +53,10 @@ class TorrentFileList
$this->build_filelist_array();
if ($this->multiple) {
if (!empty($this->files_ary['/'])) {
$this->files_ary = $this->files_ary + $this->files_ary['/'];
if (isset($this->files_ary['/'])) {
if (!empty($this->files_ary['/'])) {
$this->files_ary = $this->files_ary + $this->files_ary['/'];
}
unset($this->files_ary['/']);
}
$filelist = $html->array2html($this->files_ary);