aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-05-27 07:30:03 +0000
committerplegall <plg@piwigo.org>2010-05-27 07:30:03 +0000
commit50cd8ed52300a8613971f0d9bc0e66f4ca293b7b (patch)
treeaedbaf6b77a033d8d83511799b4c5363ed99c2a9 /admin/include
parent74bf86ecc5a352398330140d510ee150bf050e8e (diff)
bug 1704 fixed: windows needs a specific directory separator when creating
recursive directory. git-svn-id: http://piwigo.org/svn/branches/2.1@6384 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/include/functions_upload.inc.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/admin/include/functions_upload.inc.php b/admin/include/functions_upload.inc.php
index 2d8be3ceb..438f30bcd 100644
--- a/admin/include/functions_upload.inc.php
+++ b/admin/include/functions_upload.inc.php
@@ -141,6 +141,10 @@ function add_uploaded_file($source_filepath, $original_filename=null, $categorie
function prepare_directory($directory)
{
if (!is_dir($directory)) {
+ if (substr(PHP_OS, 0, 3) == 'WIN')
+ {
+ $directory = str_replace('/', DIRECTORY_SEPARATOR, $directory);
+ }
umask(0000);
$recursive = true;
if (!@mkdir($directory, 0777, $recursive))