Procházet zdrojové kódy

Fix unclosed DIR when targeting keyboard

Abdullah ibn Nadjo před 8 roky
rodič
revize
01e73a2d3d
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4
    1
      src/light.c

+ 4
- 1
src/light.c Zobrazit soubor

695
 
695
 
696
   if(light_iteratorDir == NULL)
696
   if(light_iteratorDir == NULL)
697
   {
697
   {
698
-    light_iteratorDir = opendir("/sys/class/backlight");
699
     if(light_Configuration.target == LIGHT_KEYBOARD)
698
     if(light_Configuration.target == LIGHT_KEYBOARD)
700
     {
699
     {
701
       light_iteratorDir = opendir("/sys/class/leds");
700
       light_iteratorDir = opendir("/sys/class/leds");
702
     }
701
     }
702
+    else
703
+    {
704
+      light_iteratorDir = opendir("/sys/class/backlight");
705
+    }
703
     if(light_iteratorDir == NULL)
706
     if(light_iteratorDir == NULL)
704
     {
707
     {
705
       LIGHT_ERR("could not open backlight or leds directory");
708
       LIGHT_ERR("could not open backlight or leds directory");