Page 1 of 1

configuration search path

Posted: 2008-08-01T20:13:03-07:00
by el_supremo
There's a bug in the code and documentation of the search paths used when the Windows version of IM looks for xml configuration files.
In GetConfigurePaths() in configure.c, this code which handles the HOME and USERPROFILES variables seems to be written only for Linux.

Code: Select all

/*
  Search $HOME/.magick.
*/
(void) FormatMagickString(path,MaxTextExtent,"%s%s%s",home,
  *home == '/' ? "/.magick" : "",DirectorySeparator);
On windows, the string ".magick" will not be appended to the "home" string because on a Windows system the first character of home can never be "/". So it allows either a HOME or USERPATH directory to be searched, but not the .magick subdirectory.

According to the docs in http://imagemagick.org/script/resources.php, this particular search is only done for an uninstalled version, but it is actually done for both installed and uninstalled versions and it would be useful if it stayed that way (after it's corrected) so that a .magick subdirectory of the USERPROFILE directory is allowed for either type of install.

Pete

Re: configuration search path

Posted: 2008-08-01T20:53:33-07:00
by magick
The problem you reported is fixed in the ImageMagick subversion trunk. Thanks.

Re: configuration search path

Posted: 2008-08-02T08:05:25-07:00
by el_supremo
Just a brief comment on the docs of this feature. IIRC, on Linux the HOME variable is set to the user's login path and, for sure, on Windows it is USERPROFILE which is set and so the code uses whichever one is set to create the path to a .magick directory. If so, it would be less confusing for windows users (we need all the help we can get:-) if the windows section of the docs referred to USERPROFILE\.magick instead of HOME.

Pete

Re: configuration search path

Posted: 2008-08-02T08:47:13-07:00
by magick
Done. Wait 24 hours for the update to mirror worldwide.