configuration search path

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

configuration search path

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: configuration search path

Post by magick »

The problem you reported is fixed in the ImageMagick subversion trunk. Thanks.
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: configuration search path

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: configuration search path

Post by magick »

Done. Wait 24 hours for the update to mirror worldwide.
Post Reply