]> git.donarmstrong.com Git - lilypond.git/commitdiff
(read_relocation_dir): only read dir if available.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 3 Jun 2006 09:24:10 +0000 (09:24 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 3 Jun 2006 09:24:10 +0000 (09:24 +0000)
ChangeLog
lily/relocate.cc

index 162f0804aba13202df3889811a7fec9fa47d754b..8e9eba09141f986fe88cbdd840c5a20fda79f817 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-06-03  Han-Wen Nienhuys  <hanwen@lilypond.org>
+
+       * lily/relocate.cc (read_relocation_dir): only read dir if available.
+
 2006-06-02  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * make/mutopia-vars.make (ly_examples): remove .txt from .ly.txt
index 8cb2b0861f25636ad4a01b3d603777e47f892a5a..e9addc762cb5342358ac99594fefd5aacc6de892 100644 (file)
@@ -396,12 +396,13 @@ read_relocation_dir (string dirname)
 {
   DIR *dir = opendir  (dirname.c_str ());
 
-  while (struct dirent *ent = readdir (dir))
-    {
-      File_name name (ent->d_name);
-      if (name.ext_ == "reloc")
-       {
-         read_relocation_file (dirname + "/" + name.to_string ());
-       }
-    }
+  if (dir) 
+    while (struct dirent *ent = readdir (dir))
+      {
+       File_name name (ent->d_name);
+       if (name.ext_ == "reloc")
+         {
+           read_relocation_file (dirname + "/" + name.to_string ());
+         }
+      }
 }