MultiImage absolute path check (1 Viewer)

Sambal

Portal Pro
February 4, 2008
144
144
Home Country
Netherlands Netherlands
Since revision 20484 the GUIMultiImage was altered to check if the 'imagepath' provided through the skin file is a absolute path. Unfortunately it does so by simply checking if the path exists. Because the base directory for this check is the MP root directory some relative path pass this check.

For example providing 'weather' as imagepath passes the check because in the MP root directory there is a 'weather' directory.

Because this check works the way it does, non of the directories directly under the MP root can be used as relative paths under /media/animations/

Some skins are now broken. For example Aeon Wide uses the MultiImage with 'weather' and 'plugins' directory. We can change the directory names ofcourse but i think the solution should be on the MP side.

Possible fix for this bug:

Line 421 of /Core/guilib/GUIMultiImage.cs
Code:
if (Directory.Exists(m_currentPath))
   imageFolder = m_currentPath;

should be changed to something like

Code:
if (Directory.Exists(m_currentPath) && Path.IsPathRooted(m_currentPath))
   imageFolder = m_currentPath;

Cheers,
Sambal
 

Users who are viewing this thread

Top Bottom