comparison src/mainwindow.cpp @ 607:d35ed7488ccd

Show a visible error when trying to clone to a local folder that can't be created
author Chris Cannam
date Tue, 03 Jul 2012 11:48:28 +0100
parents 372b191247da
children 6f90bb52eee6
comparison
equal deleted inserted replaced
606:372b191247da 607:d35ed7488ccd
1213 1213
1214 if (!QDir(m_workFolderPath).exists()) { 1214 if (!QDir(m_workFolderPath).exists()) {
1215 if (!QDir().mkpath(m_workFolderPath)) { 1215 if (!QDir().mkpath(m_workFolderPath)) {
1216 DEBUG << "hgCloneFromRemote: Failed to create target path " 1216 DEBUG << "hgCloneFromRemote: Failed to create target path "
1217 << m_workFolderPath << endl; 1217 << m_workFolderPath << endl;
1218 //!!! report error 1218 QMessageBox::critical
1219 (this, tr("Could not create target folder"),
1220 tr("<qt><b>Could not create target folder</b><br><br>The local target folder \"%1\" does not exist<br>and could not be created.</qt>").arg(xmlEncode(m_workFolderPath)));
1219 return; 1221 return;
1220 } 1222 }
1221 } 1223 }
1222 1224
1223 params << "clone" << m_remoteRepoPath << m_workFolderPath; 1225 params << "clone" << m_remoteRepoPath << m_workFolderPath;