Fixed ticket #43
This commit is contained in:
parent
39dc9722f1
commit
e5b6f56887
@ -487,7 +487,8 @@ class tar_file extends archive
|
||||
{
|
||||
$pwd = getcwd();
|
||||
chdir($this->options['basedir']);
|
||||
|
||||
var_dump($this->options['basedir']);
|
||||
|
||||
if($fp = $this->open_archive())
|
||||
{
|
||||
if($this->options['inmemory'] == 1)
|
||||
@ -516,6 +517,7 @@ class tar_file extends archive
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
$block = substr_replace($block," ",148,8);
|
||||
$checksum = 0;
|
||||
for($i = 0; $i < 512; $i++)
|
||||
@ -554,6 +556,7 @@ class tar_file extends archive
|
||||
}
|
||||
else if($this->options['overwrite'] == 0 && file_exists($file['name']))
|
||||
{
|
||||
|
||||
$this->error[] = "{$file['name']} already exists.";
|
||||
}
|
||||
else if($new = @fopen($file['name'],"wb"))
|
||||
@ -568,6 +571,7 @@ class tar_file extends archive
|
||||
else
|
||||
{
|
||||
$this->error[] = "Could not open {$file['name']} for writing.";
|
||||
var_dump("Could not open {$file['stat'][7]} for writing.");
|
||||
}
|
||||
}
|
||||
unset($file);
|
||||
|
@ -530,7 +530,7 @@ class backup
|
||||
* @param chaine path vers la destination
|
||||
* @return booleen
|
||||
*/
|
||||
function checkFileVersion($src,$dest)
|
||||
function checkFileVersion($src, $dest)
|
||||
{
|
||||
if (strstr($dest, $GLOBALS["CONF_DATA_PATH"]."data/") || strstr($dest, $GLOBALS["CONF_LOG_PATH"]."log/") )
|
||||
{
|
||||
|
@ -404,13 +404,13 @@ Class backupFile
|
||||
if (file_exists($path.$key) && $this->setFilePerm($path.$key, $chmod))
|
||||
{
|
||||
$tabresult[$key][0]=$val;
|
||||
$tabresult[$key][1]=True;
|
||||
$tabresult[$key][1]=True;
|
||||
}
|
||||
else
|
||||
{
|
||||
$tabresult[$key][1]=False;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -435,7 +435,7 @@ Class backupFile
|
||||
//Création de l'arbo avec les valeurs contenues dans le fichier .ini
|
||||
foreach ($tab as $key=>$val)
|
||||
{
|
||||
$tabTmp=split('/',$this->getSystemPath($val[0]));
|
||||
$tabTmp=mb_split('/',$this->getSystemPath($val[0]));
|
||||
$pathTmp="";
|
||||
$tabresult[$cpt][0]=$this->getSystemPath($val[0]);
|
||||
$tabresult[$cpt][1]=true;
|
||||
@ -562,7 +562,7 @@ Class backupFile
|
||||
* @return float version du fichier sinon 0
|
||||
*/
|
||||
function getSystemPath($pathFile){
|
||||
$tabTmp=split('/',$pathFile);
|
||||
$tabTmp=mb_split('/',$pathFile);
|
||||
if ( (is_null($tabTmp[0])) || ($tabTmp[0]==".") ){
|
||||
unset($tabTmp[0]);
|
||||
return ($this->getSystemPath(implode("/", $tabTmp)));
|
||||
@ -602,6 +602,7 @@ Class backupFile
|
||||
$gid = @filegroup('.');
|
||||
$gid2 = @filegroup($self);
|
||||
$perms = @fileperms($self);
|
||||
// var_dump(intval(substr(decoct( fileperms($self) ), 2)));
|
||||
|
||||
// Comparer l'appartenance d'un fichier cree par PHP
|
||||
// avec celle du script et du repertoire courant
|
||||
|
Loading…
Reference in New Issue
Block a user