diff --git a/fileRecv.php b/fileRecv.php index 16154d8..8cce634 100644 --- a/fileRecv.php +++ b/fileRecv.php @@ -75,22 +75,30 @@ if ( $result->count() > 0 ) { foreach ( $result as $item ) { $source = $c->profil->path->storage . - DIRECTORY_SEPARATOR . $item->client . - DIRECTORY_SEPARATOR . 'recv' . - DIRECTORY_SEPARATOR . $item->fileOut; + '/' . $item->client . + '/' . 'recv' . + '/' . $item->fileOut; + + /* + * ALTER TABLE `flux_fileout` ADD `depotDir` VARCHAR(20) NOT NULL COMMENT 'Répertoire de dépot du fichier si différent de ''recv''' AFTER `depotType`; + */ + $depotDir = 'recv'; + if ($item->depotDir != '') { + $depotDir = $item->depotDir; + } switch ($item->depotType) { case 'FTP': $dest = $c->profil->path->ftp . - DIRECTORY_SEPARATOR . $item->client . - DIRECTORY_SEPARATOR . 'recv' . - DIRECTORY_SEPARATOR . $item->fileOut; + '/' . $item->client . + '/' . $depotDir . + '/' . $item->fileOut; break; case 'SFTP': $dest = $c->profil->path->sftp . - DIRECTORY_SEPARATOR . $item->client . - DIRECTORY_SEPARATOR . 'recv' . - DIRECTORY_SEPARATOR . $item->fileOut; + '/' . $item->client . + '/' . $depotDir . + '/' . $item->fileOut; break; }