fix: don't show the udev setup info if udev v2 setup available (#943)

This commit is contained in:
Róbert Kiss
2019-04-30 03:05:03 +02:00
committed by László Monda
parent 20e2c8bbbc
commit 1b59d96296
3 changed files with 10 additions and 1 deletions

View File

@@ -328,9 +328,11 @@ export class UhkHidDevice {
}
const expectedUdevSettings = await getFileContentAsync(path.join(this.rootDir, 'rules/50-uhk60.rules'));
const v2UdevSettings = await getFileContentAsync(path.join(this.rootDir, 'rules/50-uhk60_v2.rules'));
const currentUdevSettings = await getFileContentAsync('/etc/udev/rules.d/50-uhk60.rules');
if (isEqualArray(expectedUdevSettings, currentUdevSettings)) {
if (isEqualArray(expectedUdevSettings, currentUdevSettings) ||
isEqualArray(v2UdevSettings, currentUdevSettings)) {
this._udevRulesInfo = UdevRulesInfo.Ok;
return UdevRulesInfo.Ok;
}