1 parent
1290e33207
commit
ca8f80d44f
3 files changed
+15
-11
No files matched your search
@@ -201,7 +201,7 @@ public:
|
||||
|
||||
QString fullName() const
|
||||
{
|
||||
return QFileInfo(m_path, text(0)).absoluteFilePath();
|
||||
return QDir::cleanPath(m_path) + "/" + text(0);
|
||||
}
|
||||
|
||||
inline FileTypes type( void ) const
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
}
|
||||
|
||||
static QString tryToMakeRelative( const QString & _file );
|
||||
static QString tryToMakeAbsolute( const QString & _file );
|
||||
static QString tryToMakeAbsolute(const QString & file);
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
@@ -1414,20 +1414,24 @@ QString SampleBuffer::tryToMakeRelative( const QString & _file )
|
||||
|
||||
|
||||
|
||||
QString SampleBuffer::tryToMakeAbsolute( const QString & _file )
|
||||
QString SampleBuffer::tryToMakeAbsolute(const QString& file)
|
||||
{
|
||||
if( QFileInfo( _file ).isAbsolute() )
|
||||
QFileInfo f(file);
|
||||
|
||||
if(f.isRelative())
|
||||
{
|
||||
return _file;
|
||||
f = QFileInfo(ConfigManager::inst()->userSamplesDir() + file);
|
||||
|
||||
if(! f.exists())
|
||||
{
|
||||
f = QFileInfo(ConfigManager::inst()->factorySamplesDir() + file);
|
||||
}
|
||||
}
|
||||
|
||||
QString f = ConfigManager::inst()->userSamplesDir() + _file;
|
||||
if( QFileInfo( f ).exists() )
|
||||
{
|
||||
return f;
|
||||
if (f.exists()) {
|
||||
return f.absoluteFilePath();
|
||||
}
|
||||
|
||||
return ConfigManager::inst()->factorySamplesDir() + _file;
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user