From: Han-Wen Nienhuys Date: Sat, 3 Jun 2006 09:24:10 +0000 (+0000) Subject: (read_relocation_dir): only read dir if available. X-Git-Tag: release/2.8.4~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c44b8aaad717bfc03c5d2bb455a225ae17ef2059;p=lilypond.git (read_relocation_dir): only read dir if available. --- diff --git a/ChangeLog b/ChangeLog index 162f0804ab..8e9eba0914 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-06-03 Han-Wen Nienhuys + + * lily/relocate.cc (read_relocation_dir): only read dir if available. + 2006-06-02 Han-Wen Nienhuys * make/mutopia-vars.make (ly_examples): remove .txt from .ly.txt diff --git a/lily/relocate.cc b/lily/relocate.cc index 8cb2b0861f..e9addc762c 100644 --- a/lily/relocate.cc +++ b/lily/relocate.cc @@ -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 ()); + } + } }