From: Alan Knowles Date: Thu, 1 May 2014 14:28:39 +0000 (+0800) Subject: Monitor.vala X-Git-Url: http://git.roojs.org/?p=gitlive;a=commitdiff_plain;h=2ba71d2d962577340edb87e65b6be954b61c85c6 Monitor.vala --- diff --git a/Monitor.vala b/Monitor.vala index 5deff666..9d2d8e27 100644 --- a/Monitor.vala +++ b/Monitor.vala @@ -176,8 +176,15 @@ public class Monitor : Object FileInfo next_file; - while ((next_file = file_enum.next_file(null)) != null) { - + while (true) { + try { + next_file = file_enum.next_file(null)) + } catch (Error e) { + break; + } + if (next_file == null) { + break; + } //print("got a file " + next_file.sudo () + '?=' + Gio.FileType.DIRECTORY); if (next_file.get_file_type() != FileType.DIRECTORY) {