fix starting broken when multiple cpus and no existing config
authorGuillaume Cottenceau <gcottenc@gmail.com>
Thu, 1 Aug 2013 19:51:17 +0000 (21:51 +0200)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Thu, 1 Aug 2013 19:57:23 +0000 (21:57 +0200)
VERSION
bin/booh

diff --git a/VERSION b/VERSION
index b7a8394..f132071 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.9.3.99
+0.9.3.99.2
index 0ff3181..2188d30 100644 (file)
--- a/bin/booh
+++ b/bin/booh
@@ -146,7 +146,8 @@ def read_config
         system("mkdir ~/.booh")
     end
     if $config['mproc'].nil?
-        if count_cpus > 1
+        cpus = count_cpus
+        if cpus > 1
             $config['mproc'] = cpus
         end
     end
@@ -200,7 +201,7 @@ It is generally available with the 'ImageMagick' software package.")), { :pos_ce
 
     cpus = count_cpus
 
-    if $config['cpus'] && count_cpus > $config['cpus'].to_i
+    if $config['cpus'] && cpus > $config['cpus'].to_i
         show_popup($main_window, utf8(_("It seems you now have more CPUs available than last time booh was run.
 You should probably increase the amount of CPUs configured in Edit/Preferences,
 so that web-albums are generated as fast as possible on this computer.")), { :pos_centered => true, :not_transient => true })