From f98deb4adb1f2fba8049ba86726bc08fdbe8035d Mon Sep 17 00:00:00 2001 From: Thomas Fini Hansen Date: Mon, 10 Apr 2017 20:33:31 +0200 Subject: [PATCH] Ignore non-existent directories --- ede-php-autoload/class-loader/core.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ede-php-autoload/class-loader/core.el b/ede-php-autoload/class-loader/core.el index 3dd28f9..0f97dab 100644 --- a/ede-php-autoload/class-loader/core.el +++ b/ede-php-autoload/class-loader/core.el @@ -95,12 +95,13 @@ Basically, it returns PROJECT-ROOT/{NS-DIRECTORIES}/RELATIVE-PATH/{PREFIX}*" dir (expand-file-name dir project-root)) full-dir (expand-file-name relative-path absolute-dir) - files (append files (directory-files - full-dir - nil - (concat "^" (if (string= prefix "") - "[^.]" - (regexp-quote prefix))))))) + files (when (file-exists-p full-dir) + (append files (directory-files + full-dir + nil + (concat "^" (if (string= prefix "") + "[^.]" + (regexp-quote prefix)))))))) files)) (defun ede-php-autoload--ensure-list (list-or-element)