bug fix
This commit is contained in:
parent
c062433e9b
commit
a988babb77
1 changed files with 2 additions and 4 deletions
4
sync.php
4
sync.php
|
|
@ -123,11 +123,10 @@ function getFileArray($foldername) {
|
||||||
GLOBAL $localDir, $skip_filetype, $tempFilesArray;
|
GLOBAL $localDir, $skip_filetype, $tempFilesArray;
|
||||||
|
|
||||||
$dirhandle = @opendir($foldername); //öppnar mappen
|
$dirhandle = @opendir($foldername); //öppnar mappen
|
||||||
$temp = 0;
|
|
||||||
if($dirhandle !== false){ //gick det att öppna mappen?
|
if($dirhandle !== false){ //gick det att öppna mappen?
|
||||||
while($filename = readdir($dirhandle)){ //loopar igenom alla filer i mappen
|
while($filename = readdir($dirhandle)){ //loopar igenom alla filer i mappen
|
||||||
$filepath = $foldername ."/". $filename;
|
$filepath = $foldername ."/". $filename;
|
||||||
if($temp>1 && is_dir($filepath)){ //är det en mapp?
|
if($filename != "." && $filename != ".." && is_dir($filepath)){ //är det en mapp?
|
||||||
getFileArray($filepath);
|
getFileArray($filepath);
|
||||||
}
|
}
|
||||||
else{ // its a file
|
else{ // its a file
|
||||||
|
|
@ -136,7 +135,6 @@ function getFileArray($foldername) {
|
||||||
$tempFilesArray[] = array(filemtime($filepath),str_replace($localDir, "", $filepath),("http://".$_SERVER['SERVER_NAME'].str_replace("sync.php","",$_SERVER['SCRIPT_NAME']).$filepath),$filename);
|
$tempFilesArray[] = array(filemtime($filepath),str_replace($localDir, "", $filepath),("http://".$_SERVER['SERVER_NAME'].str_replace("sync.php","",$_SERVER['SCRIPT_NAME']).$filepath),$filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$temp++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $tempFilesArray;
|
return $tempFilesArray;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue