diff --git a/MagickCore/module.c b/MagickCore/module.c index 5539ccda6e..24487e16ac 100644 --- a/MagickCore/module.c +++ b/MagickCore/module.c @@ -582,6 +582,15 @@ static MagickBooleanType GetMagickModulePath(const char *filename, (void) ConcatenateMagickString(path,DirectorySeparator, MagickPathExtent); (void) ConcatenateMagickString(path,filename,MagickPathExtent); +#if defined(MAGICKCORE_HAVE_REALPATH) + { + char + resolved_path[PATH_MAX+1]; + + if (realpath(path,resolved_path) != (char *) NULL) + (void) CopyMagickString(path,resolved_path,MagickPathExtent); + } +#endif if (IsPathAccessible(path) != MagickFalse) { module_path=DestroyString(module_path);