fixed ftp delete

This commit is contained in:
Christian Haschek
2021-01-19 11:27:21 +01:00
parent 77d4023f00
commit 68de83b46a

View File

@@ -78,7 +78,8 @@ class FTPStorage implements StorageController
function deleteFile($hash)
{
if(!$this->connect()) return false;
$ftpfilepath = FTP_BASEDIR.$hash;
$subdir = $this->hashToDir($hash);
$ftpfilepath = FTP_BASEDIR.$subdir.'/'.$hash;
return (ftp_delete($this->connection,$ftpfilepath)?true:false);
}