diff --git a/MainWindow.cpp b/MainWindow.cpp index 94f4dd5..c9b1bdd 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -174,7 +174,7 @@ MainWindow::MainWindow(QWidget *parent, QString *workspacePath) : loadSettings(); // Apply any explict workspace path if available - if(workspacePath) + if(workspacePath && !workspacePath->isEmpty()) openWorkspace(*workspacePath); refresh(); @@ -540,6 +540,9 @@ void MainWindow::scanWorkspace() QFileInfoList all_files; QString wkdir = getCurrentWorkspace(); + if(wkdir.isEmpty()) + return; + // Retrieve the status of files tracked by fossil QStringList res; if(!runFossil(QStringList() << "ls" << "-l", &res, RUNGLAGS_SILENT_ALL)) @@ -667,7 +670,7 @@ void MainWindow::scanWorkspace() // 19: [5c46757d4b9765] on 2012-04-22 04:41:15 QRegExp stash_rx("\\s*(\\d+):\\s+\\[(.*)\\] on (\\d+)-(\\d+)-(\\d+) (\\d+):(\\d+):(\\d+)", Qt::CaseInsensitive); - for(QStringList::iterator line_it=res.begin(); line_it!=res.end();) + for(QStringList::iterator line_it=res.begin(); line_it!=res.end(); ) { QString line = *line_it; @@ -676,20 +679,15 @@ void MainWindow::scanWorkspace() break; QString id = stash_rx.cap(1); - - // Parse stash name ++line_it; - line = *line_it; - // Named stash QString name; - // Finish at an anonymous stash or start of a new stash - if(line_it==res.end() || stash_rx.indexIn(line)!=-1) - { - name = tr("Stash %1").arg(id); - } - else + // Finish at an anonymous stash or start of a new stash ? + if(line_it==res.end() || stash_rx.indexIn(*line_it)!=-1) + name = line.trimmed(); + else // Named stash { + // Parse stash name name = (*line_it); name = name.trimmed(); ++line_it; diff --git a/manifest b/manifest index 8a6f8d2..037e81b 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Increased\srobustness\sin\sthe\sstash\sparsing\n -D 2012-04-22T05:57:52.133 +C Prevent\sscanning\sof\sworkspaces\swhen\swe\sdon't\shave\sa\svalid\spath\nFixed\sinvalid\saccess\sin\sstash\sparsing +D 2012-04-22T06:38:43.118 F CommitDialog.cpp a46020a9361151d8d286a2670257d01d8967bf69 F CommitDialog.h f1ee8db92103164e7db55a8407ccdcff24571b72 F CommitDialog.ui 813d7cba316e226de1a22b7e480bb969fbe9b0c4 @@ -8,7 +8,7 @@ F FileActionDialog.h 15db1650b3a13d70bc338371e4c033c66e3b79ce F FileActionDialog.ui c63644428579741aeb5fa052e237ba799ced9ad7 F FileTableView.cpp 5ddf8c391c9a3ac449ec61fb1db837b577afeec2 F FileTableView.h 03e56d87c2d46411b9762b87f4d301619aaf18df -F MainWindow.cpp 865788d994bc7c132e8a2dc0ff8893bcf0230081 +F MainWindow.cpp 63f43be93e02d1d962c8ccc48f0636f650eb0107 F MainWindow.h 78dc49fe4500a6113ed8bbff597d5305d203a80c F MainWindow.ui d569997fecf4a22d61a016a4a23eea04eaad6dee F SettingsDialog.cpp e1fad18cc020d08b82c6d35dc94f6624deec9a3b @@ -176,7 +176,7 @@ F installer/fuel.iss 13b6a938bcdf273cbd3649d2549887baa1577214 F installer/license.txt 4cc77b90af91e615a64ae04893fdffa7939db84c F main.cpp 69c1f9e873c016ef466d20298a67c3bc4c2b2f3a F resources.qrc e98383ed205f4e37100c60057e0129c3b86dea53 -P e42f476b1c07959ee224b1abbd60f811893d0717 -R f3af307696f374c7ed861ac0ac8da9ef +P ce3816871d40d08821944aa58329baf993fcb688 +R a76899b07d39493ca860fc54fea19753 U kostas -Z a39a161794cfc1b645b89f5c61f2466d +Z 22648ec8a9e0699bb52539c8c454dde9 diff --git a/manifest.uuid b/manifest.uuid index 7b4182c..ec31e0d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ce3816871d40d08821944aa58329baf993fcb688 \ No newline at end of file +c346118e744ae9d9c397194a7aa29f42256d76db \ No newline at end of file