key_value=NTRegistryKeyLookup(RegistryKey);
if (key_value != (unsigned char *) NULL)
{
- (void) FormatLocaleString(path,MagickPathExtent,"%s%s",(char *) key_value,
- DirectorySeparator);
+ (void) FormatLocaleString(path,MagickPathExtent,"%s%s",(char *)
+ key_value,DirectorySeparator);
(void) AppendValueToLinkedList(paths,ConstantString(path));
key_value=(unsigned char *) RelinquishMagickMemory(key_value);
}
char
*home;
+ home=GetEnvironmentValue("XDG_CONFIG_HOME");
+ if (home != (char *) NULL)
+ {
+ /*
+ Search $XDG_CONFIG_HOME/ImageMagick.
+ */
+ (void) FormatLocaleString(path,MaxTextExtent,"%s%sImageMagick%s%s",
+ home,DirectorySeparator,DirectorySeparator,filename);
+ (void) AppendValueToLinkedList(paths,ConstantString(path));
+ home=DestroyString(home);
+ }
home=GetEnvironmentValue("HOME");
if (home == (char *) NULL)
home=GetEnvironmentValue("USERPROFILE");
if ((NTGetModulePath("CORE_RL_MagickCore_.dll",path) != MagickFalse) ||
(NTGetModulePath("CORE_DB_MagickCore_.dll",path) != MagickFalse))
{
- (void) ConcatenateMagickString(path,DirectorySeparator,MagickPathExtent);
+ (void) ConcatenateMagickString(path,DirectorySeparator,
+ MagickPathExtent);
(void) ConcatenateMagickString(path,filename,MagickPathExtent);
if (IsPathAccessible(path) != MagickFalse)
return(MagickTrue);
char
*home;
+ home=GetEnvironmentValue("XDG_CONFIG_HOME");
+ if (home != (char *) NULL)
+ {
+ /*
+ Search $XDG_CONFIG_HOME/ImageMagick.
+ */
+ (void) FormatLocaleString(path,MaxTextExtent,"%s%sImageMagick%s%s",
+ home,DirectorySeparator,DirectorySeparator,filename);
+ home=DestroyString(home);
+ if (IsPathAccessible(path) != MagickFalse)
+ return(MagickTrue);
+ }
home=GetEnvironmentValue("HOME");
if (home == (char *) NULL)
home=GetEnvironmentValue("USERPROFILE");
/*
*/
- /* first check if $HOME/.config exists */
- (void) FormatLocaleString(path,MagickPathExtent,"%s%s.config",
+ /* first check if $HOME/.cache exists */
+ (void) FormatLocaleString(path,MagickPathExtent,"%s%s.cache",
home,DirectorySeparator);
status=GetPathAttributes(path,&attributes);
if (status == MagickFalse)
#endif
}
- /* first check if $HOME/.config/ImageMagick exists */
+ /* first check if $HOME/.cache/ImageMagick exists */
if (mkdirStatus==0)
{
- (void) FormatLocaleString(path,MagickPathExtent,"%s%s.config%sImageMagick",
- home,DirectorySeparator,DirectorySeparator);
+ (void) FormatLocaleString(path,MagickPathExtent,
+ "%s%s.cache%sImageMagick",home,DirectorySeparator,
+ DirectorySeparator);
status=GetPathAttributes(path,&attributes);
if (status == MagickFalse)