Skip to content

Commit 624b02a

Browse files
committed
Ensure repository is created if it does not exist.
1 parent 0256a39 commit 624b02a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/ItDocument.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool ItDocument::setXml(QByteArray &xml)
8080
bool ItDocument::setXml(QString &xml)
8181
{
8282
QString errorMsg; int errorLine, errorColumn;
83-
if (!doc.setContent(xml, true, &errorMsg, &errorLine, &errorColumn)) {
83+
if (!doc.setContent(xml, true, &errorMsg, &errorLine, &errorColumn)) {//qDebug()<<xml.split("\n").at(errorLine-1);
8484
errorMessage = QObject::tr("Error parsing XML document at line %1, column %2: %3.").arg(QString::number(errorLine), QString::number(errorColumn), errorMsg);
8585
return false;
8686
}

src/ItWindow.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ ItWindow::ItWindow() : QMainWindow()
4242
workDir = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0);
4343
//qDebug()<<QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
4444

45+
if (!QDir(storagePath).exists())
46+
QDir().mkdir(storagePath);
47+
4548
lockfile.setFileName(storagePath+"/.lock");
4649
if (lockfile.exists()) {
4750
QMessageBox::StandardButton resp = QMessageBox::question(this, tr("Repository locked"),

0 commit comments

Comments
 (0)