diff --git a/cdist/conf/type/__directory/gencode-remote b/cdist/conf/type/__directory/gencode-remote
index 23fa4ed3..800fc6e4 100755
--- a/cdist/conf/type/__directory/gencode-remote
+++ b/cdist/conf/type/__directory/gencode-remote
@@ -75,7 +75,7 @@ case "$state_should" in
          set_attributes=1
          cat << DONE
 rm -f "$destination"
-mkdir "$mkdiropt" "$destination"
+mkdir $mkdiropt "$destination"
 DONE
       fi
 
diff --git a/docs/changelog b/docs/changelog
index 67eaca1a..b9056fa6 100644
--- a/docs/changelog
+++ b/docs/changelog
@@ -9,6 +9,7 @@ Changelog
 	* Type __file: Only remove file when state is absent (Steven Armstrong)
 	* Type __link: Only remove link when state is absent (Steven Armstrong)
 	* Type __directory: Only remove directory when state is absent (Steven Armstrong)
+	* Type __directory: Fix newly introduced quoting issue
 	* Core: Fix backtrace when cache cannot be deleted
 
 2.3.6: 2013-11-25