Fix server bug preventing recording directory from being recognised after successful creation
When a recording directory doesn't exist, the server creates it successfully but the QFileInfo object holding the directory information is not updated as the information is cached by default. The server then exits unexpectedly as the check on the directory existence incorrectly fails. Disable caching to resolve the issue.
This commit is contained in:
parent
e918141eb7
commit
26ccef90fc
1 changed files with 4 additions and 2 deletions
|
@ -112,7 +112,8 @@ CJamSession::CJamSession(QDir recordBaseDir) :
|
||||||
vecptrJamClients (MAX_NUM_CHANNELS),
|
vecptrJamClients (MAX_NUM_CHANNELS),
|
||||||
jamClientConnections()
|
jamClientConnections()
|
||||||
{
|
{
|
||||||
const QFileInfo fi(sessionDir.absolutePath());
|
QFileInfo fi(sessionDir.absolutePath());
|
||||||
|
fi.setCaching(false);
|
||||||
|
|
||||||
if (!fi.exists() && !QDir().mkpath(sessionDir.absolutePath()))
|
if (!fi.exists() && !QDir().mkpath(sessionDir.absolutePath()))
|
||||||
{
|
{
|
||||||
|
@ -296,7 +297,8 @@ QMap<QString, QList<STrackItem>> CJamSession::TracksFromSessionDir(const QString
|
||||||
*/
|
*/
|
||||||
void CJamRecorder::Init(const CServer* server)
|
void CJamRecorder::Init(const CServer* server)
|
||||||
{
|
{
|
||||||
const QFileInfo fi(recordBaseDir.absolutePath());
|
QFileInfo fi(recordBaseDir.absolutePath());
|
||||||
|
fi.setCaching(false);
|
||||||
|
|
||||||
if (!fi.exists() && !QDir().mkpath(recordBaseDir.absolutePath()))
|
if (!fi.exists() && !QDir().mkpath(recordBaseDir.absolutePath()))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue