diff options
author | Ryan Lortie <desrt@desrt.ca> | 2011-05-05 14:22:52 +0200 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2011-05-05 14:22:52 +0200 |
commit | 9bf809f5015576b6903a80d819ab61a1d4846913 (patch) | |
tree | 5b01f9ff1097d4f946951563271776cf40b39599 /bin | |
parent | 40f72540b817043bc3fca2f53c796857a93033ad (diff) | |
download | dconf-9bf809f5015576b6903a80d819ab61a1d4846913.tar.gz |
dconf update: don't attempt to open non-files
Diffstat (limited to 'bin')
-rw-r--r-- | bin/dconf-update.vala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/dconf-update.vala b/bin/dconf-update.vala index 911b8aa..a30ce4b 100644 --- a/bin/dconf-update.vala +++ b/bin/dconf-update.vala @@ -50,6 +50,12 @@ Gvdb.HashTable read_directory (string dirname) throws GLib.Error { var dir = Dir.open (dirname); while ((name = dir.read_name ()) != null) { var filename = Path.build_filename (dirname, name); + Posix.Stat buf; + + // only 'normal' files + if (Posix.stat (filename, out buf) < 0 || !Posix.S_ISREG (buf.st_mode)) { + continue; + } var kf = new KeyFile (); |