[sane-devel] [PATCH] Fix handling of SANE_CONFIG_DIR environment variable

Reinhold Kainhofer reinhold at kainhofer.com
Mon Sep 13 14:40:43 UTC 2010

Am Freitag, 3. September 2010, 16:57:14 schrieb Reinhold Kainhofer:
> Attached is a patch for the current sane-backends git, which fixes several
> problems with the handling of the SANE_CONFIG_DIR environment variable.

Is there anyone here you can take a look at the patch, concerning correctness 

BTW, the main problem (wrong pointers to the list of config dirs) does not 
appear when you set SANE_CONFIG_DIR only to one directory, but only if you set 
it to two or more directories. Here's the debug output of current git master 
in that case (notice the path before dll.aliases!):

reinhold at curie:~/Software/sane-backends$ export \ 
reinhold at curie:~/Software/sane-backends$ scanimage -L
[sanei_debug] Setting debug level of sanei_config to 127.
[sanei_config] sanei_config_open: attempting to open 
[sanei_config] sanei_config_open: using file 
[sanei_config] sanei_config_open: attempting to open `���/dll.aliases'
[sanei_config] sanei_config_open: could not find config file `dll.aliases'

The problem that the dll backend always looks only in /etc/sane.d/dll.d/, even 
when a different SANE_CONFIG_DIR is given, is of course present in all cases.

Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

More information about the sane-devel mailing list