[quote=“Tom Elliott, post: 24602, member: 7271”]Sure.[/quote]
I have just one last problem : as I said the SYNOLOGY or IOMEGA put before their NFS shares a name like “[B]volume1[/B]” or “[B]nethdd[/B]” while sharing the same FTP did not !
For the same share on SYNOLOGY:NFS : /volume1/imagesFTP : /imagesThe problem after the backup operation when ftp_delete and ftp_rename.
So I added before line 57 in / var/www/html/fog/service/Post_Stage2.php
[CODE]
// SYNOLOGY —
if(stripos($dest, ‘volume1’) !==false){
$src = str_replace(“/volume1/”, “/”, $src);
$dest = str_replace(“/volume1/”, “/”, $dest);
// IOMEGA —
if(stripos($dest, ‘nethdd’) !==false){
$src = str_replace(“/nethdd/”, “/”, $src);
$dest = str_replace(“/nethdd/”, “/”, $dest); }
[/CODE]
And replaced the function delete($path) in /var/www/html/fog/lib/fog/FOGFTP.class.php because SYNOLOGY do not like the “[B]ftp_nlist[/B]” function but rather “[B]ftp_rawlist[/B] "
[CODE]
public function delete($path)
{
if (!(@ftp_delete($this->link, $path)||@ftp_rmdir($this->link,$path)))
{
$filelistraw = $this->ftp_nlist_Syno($this->link,$path);
$filelist = (array_keys($filelistraw));
if ($filelist[0]){
foreach($filelist AS $file)
{
$this->delete($path.”/".$file);
}
$this->delete($path);
}
}
// Return
return $this;
}
public function ftp_nlist_Syno($resource, $directory)
{
if (is_array($children = @ftp_rawlist($resource, $directory))) {
$items = array();
foreach ($children as $child) {
$chunks = preg_split("/\s+/", $child);
//$item['type'] = $chunks[0]{0} === 'd' ? 'directory' : 'file';
array_splice($chunks, 0, 8);
$items[implode(" ", $chunks)] = $item;
}
return $items;
}
// Throw exception or return false < up to you
}
[/CODE]
[COLOR=#3366ff]There he has a way to solve this problem ?[/COLOR]
[url=“/_imported_xf_attachments/0/610_Capture.JPG?:”]Capture.JPG[/url]