Skip to content

Commit

Permalink
Create missing directories too.
Browse files Browse the repository at this point in the history
  • Loading branch information
paca70 committed Mar 10, 2005
1 parent 1ca9c0a commit 33c35e6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions admin/langdoc.php
Expand Up @@ -112,6 +112,17 @@
if (!empty($currentfile)) {

if (!file_exists("$langdir/$currentfile")) {
//check if directory exist
$pathparts = explode('/',$currentfile);
$checkpath = $langdir;
for ($a=0; $a < count($pathparts)-1 ; $a++) {
$checkpath .= "/".$pathparts[$a];
if(!file_exists($checkpath)){
if(!mkdir($checkpath)){
echo ("Cannot create directory: $checkpath");
}
}
}
//
// file doesn't exist - let's check webserver's permission to create it
//
Expand Down

0 comments on commit 33c35e6

Please sign in to comment.