do not abort on failed directory reads
authorGuillaume Cottenceau <gcottenc@gmail.com>
Sun, 29 Nov 2009 21:30:46 +0000 (22:30 +0100)
committerGuillaume Cottenceau <gcottenc@gmail.com>
Sun, 29 Nov 2009 21:30:46 +0000 (22:30 +0100)
1  2 
bin/booh-classifier

index a3c6beba40f36cd0341cc3c90f980d765ef68203,b1789cbd8eff7210c9a0c6d88f431b068fea814f..5b4c69d02d47853e7cfebd70a30619e342bc245c
@@@ -1281,9 -1286,11 +1285,13 @@@ def open_dir(*paths
                      msg 1, _("Ignoring directory %s, begins with a dot (indicating a hidden directory)") % dir
                      next
                  end
-                 entries += Dir.entries(dir).collect { |file| File.join(dir, file) }
+                 begin
+                     entries += Dir.entries(dir).collect { |file| File.join(dir, file) }
+                 rescue
+                     #- already puts'ed 10 lines upper
+                 end
 +                sb_msg(_("Scanning source directory... %s") % (_("%d entries found") % entries.size))
 +                Gtk.main_iteration while Gtk.events_pending?
              }
  
          else