comparison 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
comparison
equal deleted inserted replaced
150:6e8bce502be3 151:f8110d1a3a37
86 86
87 for (unsigned int i = 0; i < sampleResourceDir.count(); ++i) { 87 for (unsigned int i = 0; i < sampleResourceDir.count(); ++i) {
88 88
89 QString fileName(sampleResourceDir[i]); 89 QString fileName(sampleResourceDir[i]);
90 QFile file(sampleResourceDir.filePath(fileName)); 90 QFile file(sampleResourceDir.filePath(fileName));
91 91 QString target = QDir(m_sampleDir).filePath(fileName);
92 if (!file.copy(QDir(m_sampleDir).filePath(fileName))) { 92
93 if (!file.copy(target)) {
93 std::cerr << "WARNING: AudioGenerator::getSampleDir: " 94 std::cerr << "WARNING: AudioGenerator::getSampleDir: "
94 << "Unable to copy " << fileName.toStdString() 95 << "Unable to copy " << fileName.toStdString()
95 << " into temporary directory \"" 96 << " into temporary directory \""
96 << m_sampleDir.toStdString() << "\"" << std::endl; 97 << m_sampleDir.toStdString() << "\"" << std::endl;
98 } else {
99 QFile tf(target);
100 tf.setPermissions(tf.permissions() |
101 QFile::WriteOwner |
102 QFile::WriteUser);
97 } 103 }
98 } 104 }
99 } 105 }
100 106
101 bool 107 bool