diff mainwindow.cpp @ 184:1220f26d6f35

* Can edit hgrc even if it doesn't exist yet
author Chris Cannam
date Sun, 19 Dec 2010 19:11:23 +0000
parents 01580704de3e
children 6c15700f4103
line wrap: on
line diff
--- a/mainwindow.cpp	Sun Dec 19 12:01:37 2010 +0000
+++ b/mainwindow.cpp	Sun Dec 19 19:11:23 2010 +0000
@@ -917,8 +917,14 @@
 {
     // This will involve rewriting the local .hgrc
 
+    QDir hgDir(workFolderPath + "/.hg");
+    if (!hgDir.exists()) {
+        //!!! visible error!
+        return;
+    }
+
     QFileInfo hgrc(workFolderPath + "/.hg/hgrc");
-    if (!hgrc.exists() || !hgrc.isWritable()) {
+    if (hgrc.exists() && !hgrc.isWritable()) {
         //!!! visible error!
         return;
     }