mirror of
https://github.com/LMMS/lmms.git
synced 2026-05-17 19:24:52 -04:00
Merge branch 'stable-1.2'
# Conflicts: # .circleci/config.yml # .travis/osx..install.sh # CMakeLists.txt # plugins/zynaddsubfx/zynaddsubfx # plugins/zynaddsubfx/zynaddsubfx/src/DSP/FFTwrapper.h # plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp # plugins/zynaddsubfx/zynaddsubfx/src/Params/PADnoteParameters.cpp # plugins/zynaddsubfx/zynaddsubfx/src/Synth/OscilGen.cpp # src/CMakeLists.txt # src/core/Track.cpp # src/tracks/Pattern.cpp
This commit is contained in:
@@ -1404,7 +1404,7 @@ QString SampleBuffer::tryToMakeRelative( const QString & file )
|
||||
if( QFileInfo( file ).isRelative() == false )
|
||||
{
|
||||
// Normalize the path
|
||||
QString f = QFileInfo( file ).canonicalFilePath().replace( QDir::separator(), '/' );
|
||||
QString f( QDir::cleanPath( file ) );
|
||||
|
||||
// First, look in factory samples
|
||||
// Isolate "samples/" from "data:/samples/"
|
||||
@@ -1413,7 +1413,7 @@ QString SampleBuffer::tryToMakeRelative( const QString & file )
|
||||
// Iterate over all valid "data:/" searchPaths
|
||||
for ( const QString & path : QDir::searchPaths( "data" ) )
|
||||
{
|
||||
QString samplesPath = QString( path + samplesSuffix ).replace( QDir::separator(), '/' );
|
||||
QString samplesPath = QDir::cleanPath( path + samplesSuffix ) + "/";
|
||||
if ( f.startsWith( samplesPath ) )
|
||||
{
|
||||
return QString( f ).mid( samplesPath.length() );
|
||||
|
||||
Reference in New Issue
Block a user