Vestige: Path to VST plugins stored as relative, if opened from default VST plugin path

Path to VST plugin will be stored as relative, if plugin is opened
from default VST plugin path. Should remain compatible with project saves
from old releases or vice versa.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
This commit is contained in:
Mike Choi
2013-02-12 23:29:34 +01:00
committed by Tobias Doerffel
parent 440da8ba15
commit d82227aefb

View File

@@ -169,6 +169,16 @@ void vestigeInstrument::setParameter( void )
void vestigeInstrument::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
if( QFileInfo( m_pluginDLL ).isAbsolute() )
{
QString relativePath;
if( !( relativePath = m_pluginDLL.section( configManager::
inst()->vstDir(), 1, 1 ) ).isEmpty() )
{
m_pluginDLL = relativePath;
}
}
_this.setAttribute( "plugin", m_pluginDLL );
m_pluginMutex.lock();
if( m_plugin != NULL )