From: soufiane Date: Wed, 3 Apr 2024 10:00:30 +0000 (+0200) Subject: wait #6843 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=25219cb931f6cd04fe8a9cbf636af6c3750f932f;p=cubist_net.git wait #6843 --- diff --git a/src/Transfer/SFTP.php b/src/Transfer/SFTP.php index a1160ad..83adc2d 100644 --- a/src/Transfer/SFTP.php +++ b/src/Transfer/SFTP.php @@ -62,10 +62,11 @@ class SFTP extends Driver { } 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;