From 79fa97cfe3f19e8487c5ca8b8af66bf5e4d7e7ce Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 9 Jan 2017 11:46:51 -0800 Subject: [PATCH] web: if mkdir fails, show the path in error msg --- html/inc/dir_hier.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/inc/dir_hier.inc b/html/inc/dir_hier.inc index 1d806b05dd..d174bc02f5 100644 --- a/html/inc/dir_hier.inc +++ b/html/inc/dir_hier.inc @@ -29,7 +29,9 @@ function dir_hier_path($filename, $root, $fanout) { $dir = filename_hash($filename, $fanout); $dirpath = "$root/$dir"; if (!is_dir($dirpath)) { - mkdir($dirpath); + if (!mkdir($dirpath)) { + echo "failed to mkdir: $dirpath\n"; + } } return "$dirpath/$filename"; }