    this.updateCounter = function (counter) {
        if (counter === undefined) {
            this.getAdaptersInfo(this.main.currentHost, false, false, function (repository, installedList) {
                let adaptersToUpdate = 0;

                for (const adapter in installedList) {
                    if (!installedList.hasOwnProperty(adapter)) continue;
                    const obj = installedList ? installedList[adapter] : null;
                    if (!obj || obj.controller || adapter === 'hosts') continue;

                    let version = '';
                    if (repository[adapter] && repository[adapter].version) {
                        version = repository[adapter].version;
                    }

                    if (obj.version && !that.main.upToDate(version, obj.version)) {
                        adaptersToUpdate++;
                    }
                }
                that.updateCounter(adaptersToUpdate);
            });
        } else if (counter) {
            const $updates = $('#updates-for-adapters');
            if ($updates.length) {
                $updates.text(counter);
            } else {
                $('<span id="updates-for-adapters" title="' + _('updates') + '" class="new badge updates-for-adapters" data-badge-caption="">' + counter + '</span>').appendTo('.admin-sidemenu-items[data-tab="tab-adapters"] a');
            }
        } else {
            $('#updates-for-adapters').remove();
        }
    };
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.