Mercurial > hg > svapp
diff audioio/AudioGenerator.cpp @ 151:f8110d1a3a37
* Attempt to sort out strange permissions for samples?
author | Chris Cannam |
---|---|
date | Fri, 12 Dec 2008 17:06:33 +0000 |
parents | e25e8f5d785b |
children | 7fff1bb8cc3d |
line wrap: on
line diff
--- a/audioio/AudioGenerator.cpp Fri Dec 12 16:03:37 2008 +0000 +++ b/audioio/AudioGenerator.cpp Fri Dec 12 17:06:33 2008 +0000 @@ -88,12 +88,18 @@ QString fileName(sampleResourceDir[i]); QFile file(sampleResourceDir.filePath(fileName)); + QString target = QDir(m_sampleDir).filePath(fileName); - if (!file.copy(QDir(m_sampleDir).filePath(fileName))) { + if (!file.copy(target)) { std::cerr << "WARNING: AudioGenerator::getSampleDir: " << "Unable to copy " << fileName.toStdString() << " into temporary directory \"" << m_sampleDir.toStdString() << "\"" << std::endl; + } else { + QFile tf(target); + tf.setPermissions(tf.permissions() | + QFile::WriteOwner | + QFile::WriteUser); } } }