Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow relative paths on non-existent directories
Closes #4267
  • Loading branch information
tresf committed Mar 22, 2018
commit 68b9dacfde95179ba933015c1da6a700148c5177
2 changes: 1 addition & 1 deletion src/core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ bool ConfigManager::hasWorkingDir() const

void ConfigManager::setWorkingDir( const QString & wd )
{
m_workingDir = ensureTrailingSlash( QFileInfo( wd ).canonicalFilePath() );
m_workingDir = ensureTrailingSlash( QDir::cleanPath( wd ) );
}


Expand Down
4 changes: 3 additions & 1 deletion src/core/SampleBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1416,7 +1416,9 @@ QString SampleBuffer::tryToMakeRelative( const QString & file )
if( QFileInfo( file ).isRelative() == false )
{
// Normalize the path
QString f = QFileInfo( file ).canonicalFilePath().replace( QDir::separator(), '/' );
QFileInfo fileInfo( file );
QString f( QDir::cleanPath( file ) + QDir::separator() + QFileInfo( file ).fileName() );
f.replace( QDir::separator(), '/' );

// First, look in factory samples
// Isolate "samples/" from "data:/samples/"
Expand Down