}
try {
- $filename = $this->getTestFilename($tmp);
+ $filename = "cubistzsuruz"; //$this->getTestFilename($tmp);
$sftp = ssh2_sftp($connection);
- fopen("ssh2.sftp://".intval($sftp).$this->getServer()->getBasePath().$filename, 'r'); //on vérifie l'existance du fichier distant
- ssh2_sftp_unlink($sftp, $this->getServer()->getBasePath().$filename); //on supprime le fichier distant
+ $basepath = '/'.trim($this->getServer()->getBasePath(), '/').'/';
+ $f = @ssh2_sftp_stat($sftp, $basepath.$filename);
+ ssh2_sftp_unlink($sftp, $basepath.$filename); //on supprime le fichier distant
ssh2_disconnect($connection); //on quitte la connexion
unlink($tmp); //on supprime le fichier temporaire en local
return true;