From e6d436e8d099a394bf5f8a9a573579639e236a90 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 19 Oct 2008 03:38:28 +0000 Subject: [PATCH] If does not exist, then call safe_mkdir on it. --- etc/inc/pkg-utils.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 35ea9439c8..cb7791476b 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -565,7 +565,9 @@ function install_package_xml($pkg) { } else { $prefix = "/usr/local/pkg/"; } - $static_output .= $filename . " "; + if(!is_dir($prefix)) + safe_mkdir($prefix); + $static_output .= $filename . " "; update_output_window($static_output); download_file_with_progress_bar($afn['item'][0], $prefix . $filename); if(stristr($filename, ".tgz") <> "") {